Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapTiler won´t load on macOS until installing X11 from 2016 #141

Closed
hinrichd opened this issue Dec 2, 2020 · 4 comments
Closed

MapTiler won´t load on macOS until installing X11 from 2016 #141

hinrichd opened this issue Dec 2, 2020 · 4 comments

Comments

@hinrichd
Copy link

hinrichd commented Dec 2, 2020

Using macOS 10.15.7

Error Message when loading maptiler...
`Konnte Erweiterung 'qgis-maptiler-plugin' nicht laden aufgrund eines Fehlers beim Aufruf der classFactory() Methode

ImportError: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Pillow-7.2.0-py3.7-macosx-10.13.0-x86_64.egg/PIL/_imaging.cpython-37m-darwin.so, 2): Library not loaded: /opt/X11/lib/libxcb.1.dylib Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Pillow-7.2.0-py3.7-macosx-10.13.0-x86_64.egg/PIL/_imaging.cpython-37m-darwin.so Reason: image not found
Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-maptiler-plugin/init.py", line 35, in classFactory
from .maptiler import MapTiler
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-maptiler-plugin/maptiler.py", line 34, in
from .browser_root_collection import DataItemProvider
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-maptiler-plugin/browser_root_collection.py", line 7, in
from .browser_mapitem import MapDataItem
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-maptiler-plugin/browser_mapitem.py", line 11, in
from .gl2qgis import converter
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgis-maptiler-plugin/gl2qgis/converter.py", line 19, in
from PIL import Image
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Pillow-7.2.0-py3.7-macosx-10.13.0-x86_64.egg/PIL/Image.py", line 94, in
from . import _imaging as core
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Pillow-7.2.0-py3.7-macosx-10.13.0-x86_64.egg/PIL/_imaging.cpython-37m-darwin.so, 2): Library not loaded: /opt/X11/lib/libxcb.1.dylib
Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Pillow-7.2.0-py3.7-macosx-10.13.0-x86_64.egg/PIL/_imaging.cpython-37m-darwin.so
Reason: image not found

Python-Version: 3.7.7 (default, Sep 22 2020, 10:25:18) [Clang 12.0.0 (clang-1200.0.32.2)]
QGIS-Version: 3.16.0-Hannover Hannover, 4af1cbfb97

Python-Pfad:
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/rasterio-1.1.5-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/scipy-1.5.1-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/numba-0.50.1-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/snuggs-1.4.7-py3.7.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/click_plugins-1.1.1-py3.7.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/opencv_contrib_python-4.3.0.36-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/statsmodels-0.11.1-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Fiona-1.8.13.post1-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/GDAL-3.1.2-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/cftime-1.2.1-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/patsy-0.5.1-py3.7.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/pyproj-2.6.0-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python37.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/numpy-1.19.1-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/affine-2.3.0-py3.7.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Pillow-7.2.0-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/netCDF4-1.5.3-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/pandas-1.1.0-py3.7-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/geopandas-0.8.1-py3.7.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages/Rtree-0.9.4-py3.7.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.7/site-packages
/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python`

After Installing X11 from https://www.xquartz.org/ i could load the maptiler plugin on a test mac. But I am really curious about installing X11 from 2016 on Catalina in therms of security? Is the plugin only working on macOS if the x11 window manager is installed? Is there any other option to make it work?

@lazaa32
Copy link
Collaborator

lazaa32 commented Dec 2, 2020

Hi @hinrichd
Sorry not a big OSX user and I've never heard of X11 before. It seems that your issue is duplicate of #140. Could you try to upgrade Pillow library from QGIS python environment?

/Applications/QGIS.app/Contents/MacOS/bin/pip3 install pillow -U

AFAIK you don't need to install any other window managers to run the plugin on OSX.

@hinrichd
Copy link
Author

hinrichd commented Dec 2, 2020

Hi @lazaa32
Thank you! I have upgraded the Pillow library and it is working now!

Do you know if the pillow library will be updated in the next qgis release? 3.17?

Very happy that i do not have to install any window manager on macOS. 👍

@lazaa32
Copy link
Collaborator

lazaa32 commented Dec 2, 2020

Good to know. I would point you to this website where I read about the packages for QGIS on MacOS. I would recomend to ask developers there whether the library will be upgraded.

@hinrichd hinrichd closed this as completed Dec 2, 2020
@hinrichd
Copy link
Author

hinrichd commented Dec 2, 2020

duplicate of #140.

@lazaa32 lazaa32 mentioned this issue Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants