opengisch / qgis-swiss-locator

Swiss Geoadmin layer and feature search for QGIS 3
https://www.opengis.ch/2024/06/25/swiss-locator-plugin-3-0-is-here-with-exciting-features/
GNU General Public License v3.0
13 stars 4 forks source link

Installation fails on QGIS 3.0 #4

Closed m-kuhn closed 6 years ago

m-kuhn commented 6 years ago

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 6 years ago

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 6 years ago

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

3nids commented 6 years ago

should be fixed in 1.1.4

m-kuhn commented 6 years ago

Seems to be still problematic...

image002

3nids commented 6 years ago

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

3nids commented 6 years ago

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

m-kuhn commented 6 years ago

@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

m-kuhn commented 6 years ago

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