← Back to team overview

openlp-core team mailing list archive

[Bug 1738047] [NEW] OpenLP picks up macOS hidden files when loading plugins

 

Public bug reported:

macOS *loves* to litter the filesystem with hidden files which are
somehow useful to it. Unfortunately this means that if a user moves
OpenLP out of the Applications directory, macOS will create these silly
._* files, and then OpenLP chokes on them when trying to find its
plugins.

To work around macOS's ridiculous behaviour, we simply need to make sure
we exclude files starting with "._" when searching for plugins.

See the original bug report below:


Version: {'version': '2.4.6', 'full': '2.4.6', 'build': None}

--- Details of the Exception. ---

Hi,

I have a need to keep some applications on the USB sticlk, so I moved entire OpenLP folder from
/Volumes/Macintosh HD/Applications/
to
/Volumes/KINGSTONE64/Applications/

The trick above works fine to other applications like Evenote, Gimp,
Nozbe, Google Earth, etc... while OpenLP won't start after that. Even
OpenSong starts propelry after move to USB stick.

Thank you in advance for the correction, I would appreciate for the
patch or woraround as soon as possible.

Best regards

--- Exception Traceback ---
Traceback (most recent call last):
  File "tokenize.py", line 392, in find_cookie
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "openlp-run.py", line 44, in <module>
  File "openlp/core/__init__.py", line 437, in main
  File "openlp/core/__init__.py", line 142, in run
  File "openlp/core/common/registry.py", line 137, in execute
  File "openlp/core/lib/pluginmanager.py", line 54, in bootstrap_initialise
  File "openlp/core/lib/pluginmanager.py", line 92, in find_plugins
  File "imp.py", line 302, in find_module
  File "tokenize.py", line 433, in detect_encoding
  File "tokenize.py", line 397, in find_cookie
  File "<string>", line None
SyntaxError: invalid or missing encoding declaration for '/Volumes/KINGSTONE64/Applications/OpenLP.app/Contents/MacOS/plugins/.___init__.py'

--- System information ---
Platforma: Darwin-16.7.0-x86_64-i386-64bit

--- Library Versions ---
Python: 3.4.6
Qt5: 5.6.2
PyQt5: 5.7.1
QtWebkit: 538.1
SQLAlchemy: 1.1.5
SQLAlchemy Migrate: -
BeautifulSoup: 4.4.1
lxml: 3.6.0
Chardet: 2.3.0
PyEnchant: 1.6.6
Mako: 1.0.6
pyICU: -
pyUNO bridge: -
VLC: -

** Affects: openlp
     Importance: Low
         Status: New

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1738047

Title:
  OpenLP picks up macOS hidden files when loading plugins

Status in OpenLP:
  New

Bug description:
  macOS *loves* to litter the filesystem with hidden files which are
  somehow useful to it. Unfortunately this means that if a user moves
  OpenLP out of the Applications directory, macOS will create these
  silly ._* files, and then OpenLP chokes on them when trying to find
  its plugins.

  To work around macOS's ridiculous behaviour, we simply need to make
  sure we exclude files starting with "._" when searching for plugins.

  See the original bug report below:

  
  Version: {'version': '2.4.6', 'full': '2.4.6', 'build': None}

  --- Details of the Exception. ---

  Hi,

  I have a need to keep some applications on the USB sticlk, so I moved entire OpenLP folder from
  /Volumes/Macintosh HD/Applications/
  to
  /Volumes/KINGSTONE64/Applications/

  The trick above works fine to other applications like Evenote, Gimp,
  Nozbe, Google Earth, etc... while OpenLP won't start after that. Even
  OpenSong starts propelry after move to USB stick.

  Thank you in advance for the correction, I would appreciate for the
  patch or woraround as soon as possible.

  Best regards

  --- Exception Traceback ---
  Traceback (most recent call last):
    File "tokenize.py", line 392, in find_cookie
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "openlp-run.py", line 44, in <module>
    File "openlp/core/__init__.py", line 437, in main
    File "openlp/core/__init__.py", line 142, in run
    File "openlp/core/common/registry.py", line 137, in execute
    File "openlp/core/lib/pluginmanager.py", line 54, in bootstrap_initialise
    File "openlp/core/lib/pluginmanager.py", line 92, in find_plugins
    File "imp.py", line 302, in find_module
    File "tokenize.py", line 433, in detect_encoding
    File "tokenize.py", line 397, in find_cookie
    File "<string>", line None
  SyntaxError: invalid or missing encoding declaration for '/Volumes/KINGSTONE64/Applications/OpenLP.app/Contents/MacOS/plugins/.___init__.py'

  --- System information ---
  Platforma: Darwin-16.7.0-x86_64-i386-64bit

  --- Library Versions ---
  Python: 3.4.6
  Qt5: 5.6.2
  PyQt5: 5.7.1
  QtWebkit: 538.1
  SQLAlchemy: 1.1.5
  SQLAlchemy Migrate: -
  BeautifulSoup: 4.4.1
  lxml: 3.6.0
  Chardet: 2.3.0
  PyEnchant: 1.6.6
  Mako: 1.0.6
  pyICU: -
  pyUNO bridge: -
  VLC: -

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1738047/+subscriptions


Follow ups