opengisch / solocator

GNU General Public License v3.0
0 stars 1 forks source link

Installation problems in QGIS master (3.11) #47

Closed andreasneumann closed 5 years ago

andreasneumann commented 5 years ago

When trying to install the SoLocator plugin in QGIS master (3.11) on Linux I get the following error message and the plugin can't load:

Couldn't load plugin 'solocator' due to an error when calling its classFactory() method 

AttributeError: module 'solocator.core' has no attribute 'settings' 
Traceback (most recent call last):
  File "/usr/local/share/qgis/python/qgis/utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/solocator/__init__.py", line 30, in classFactory
    from .solocator_plugin import SoLocatorPlugin
  File "/usr/local/share/qgis/python/qgis/utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/solocator/solocator_plugin.py", line 23, in 
    from solocator.core.solocator_filter import SoLocatorFilter
  File "/usr/local/share/qgis/python/qgis/utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/solocator/core/solocator_filter.py", line 35, in 
    from solocator.core.settings import Settings, BASE_URL, SEARCH_URL, FEATURE_URL, DATA_PRODUCT_URL
  File "/usr/local/share/qgis/python/qgis/utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/solocator/core/settings.py", line 21, in 
    import solocator.core.layer as layer
  File "/usr/local/share/qgis/python/qgis/utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/solocator/core/layer.py", line 29, in 
    import solocator.core.settings as settings
AttributeError: module 'solocator.core' has no attribute 'settings'

Python version: 3.6.8 (default, Oct  7 2019, 12:59:55) [GCC 8.3.0] 
QGIS version: 3.11.0-Master Master, b38e191010 

Python Path:
/usr/local/share/qgis/python
/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python
/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/local/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/bjsvwneu/.local/share/QGIS/QGIS3/profiles/default/python
3nids commented 5 years ago

I could not replicate with a clear new profile.

andreasneumann commented 5 years ago

Strange - I just recompiled master again and started a new profile. Still the exact same error message like above in my ticket.

Some local issue with my machine?

@m-kuhn could you please test if you can install the SoLocator in recent master on your Linux machine?

3nids commented 5 years ago

Maybe it's a Python 3.6 vs 3.7 issue. I will look again at these imports if I can do differently

3nids commented 5 years ago

Someone else tested on a Linux machine with Python 3.8 without issue. Still waiting for another test with 3.6

andreasneumann commented 5 years ago

Ok - I will also test tonight on my home machine and report back.

andreasneumann commented 5 years ago

FYI - on the same machine (same Python) the SoLocator plugin also doesn't install in version 3.4.12 and also not in QGIS 3.8.3 (all self-compiled). Other Python plugins run fine and also an older version of SoLocator installed fine.

Should I test the older SoLocator version to see which one still installed ok?

3nids commented 5 years ago

I tried an alternative approach for import to avoid circular dependencies, and it apparently fails on Python 3.6. Will try to fix this.

3nids commented 5 years ago

fixed in dd2a839

3nids commented 5 years ago

released in 1.2.2 (should be available in QGIS within 15-60 minutes)

andreasneumann commented 5 years ago

Seems to work fine now on my Linux/Python 3.6 machine.

Thanks a lot!