ChrisLisbon / QGIS_LinesRankingPlugin

Repository for QGIS Lines Ranking Plugin
GNU General Public License v3.0
18 stars 3 forks source link

Error while running the plugin on Mac #1

Open paolabfor opened 3 years ago

paolabfor commented 3 years ago

Hi, I installed Lines Ranking Plugin with the Plugin Manager in QGIS but when I run it I have the follow error:

An error has occurred while executing Python code: 

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 "/Users/paolabonato/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/lines_ranking/lines_ranking.py", line 223, in run
    from .worker_class import Worker
  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/paolabonato/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/lines_ranking/worker_class.py", line 29, in 
    from .graph_processing import overall_call
  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/paolabonato/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/lines_ranking/graph_processing.py", line 25, in 
    import matplotlib.pyplot as plt
  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/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg/matplotlib/pyplot.py", line 36, in 
    import matplotlib.colorbar
  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/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg/matplotlib/colorbar.py", line 44, in 
    import matplotlib.contour as contour
  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/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg/matplotlib/contour.py", line 17, in 
    import matplotlib.text as text
  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/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg/matplotlib/text.py", line 16, in 
    from .textpath import TextPath  # Unused, but imported by others.
  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/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg/matplotlib/textpath.py", line 11, in 
    from matplotlib.mathtext import MathTextParser
  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/matplotlib-3.3.0-py3.7-macosx-10.13.0-x86_64.egg/matplotlib/mathtext.py", line 27, 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

These are the QGIS and Python information:

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.2-Hannover Hannover, c6ac5a6052

Thanks in advance. Paola

wgfsophia commented 2 years ago

Hi, I met the similar problem, I wonder if yours has been solved.