opengisch/qgis-swiss-locator

Installation fails on QGIS 3.0

m-kuhn opened this issue · 8 comments

Is the plugin not compatible with QGIS or is there something missing in the installation?

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

ModuleNotFoundError: No module named 'qgsfilterlineedit' 
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 336, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\swiss_locator\__init__.py", line 32, in classFactory
    from .swiss_locator_plugin import SwissLocatorPlugin
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\swiss_locator\swiss_locator_plugin.py", line 27, in 
    from .swiss_locator_filter import SwissLocatorFilter, FilterType
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\swiss_locator\swiss_locator_filter.py", line 40, in 
    from swiss_locator.gui.config_dialog import ConfigDialog
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\swiss_locator\gui\config_dialog.py", line 34, in 
    DialogUi, _ = loadUiType(os.path.join(os.path.dirname(__file__), '../ui/config.ui'))
  File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\__init__.py", line 201, in loadUiType
    exec(code_string.getvalue(), ui_globals)
  File "", line 88, in 
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'qgsfilterlineedit'


Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
QGIS version: 3.0.3-Girona Girona, 8a899c8758 

Python Path:
C:/OSGEO4~1/apps/qgis/./python
C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGEO4~1/apps/qgis/./python/plugins
C:\OSGeo4W64\bin\python36.zip
C:\OSGEO4~1\apps\Python36\DLLs
C:\OSGEO4~1\apps\Python36\lib
C:\OSGeo4W64\bin
C:\OSGEO4~1\apps\Python36
C:\OSGEO4~1\apps\Python36\lib\site-packages
C:\OSGEO4~1\apps\Python36\lib\site-packages\h5py-2.7.0-py3.6-win-amd64.egg
C:\OSGEO4~1\apps\Python36\lib\site-packages\win32
C:\OSGEO4~1\apps\Python36\lib\site-packages\win32\lib
C:\OSGEO4~1\apps\Python36\lib\site-packages\Pythonwin
C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/philipp.zihlmann/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview
C:\Users\philipp.zihlmann\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\go2streetview\res
3nids commented

apparently there is an issue for the custom widgets one more.
can you check if you can find pythonX/site-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py?

Also which version is it (plugin)?
I switched PyQt5.uic to qgis.PyQt.uic hoping this would fix this, but apparently not. The commit was just yesterday and the release too (1.1.3)

3nids commented

otherwise, we can add the same trick than here
https://github.com/qgis/QGIS/pull/7130/files

3nids commented

should be fixed in 1.1.4

Seems to be still problematic...

image002

3nids commented

@m-kuhn can you check if you can find pythonX/site-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py ?

3nids commented

I think it might be a matter of launching QGIS with the proper PYTHONPATH.
If so, something to be fixed in OSGeo4W.

@m-kuhn can you check if you can find pythonX/site-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py ?

Was missing, manually placing the file there fixes the issue

Since QGIS 3.0 is EOL, I think we should just adjust the compatibility version and forget about it.