linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

Gazetteer plugin no longer compatible as of QGIS 3.34, 3.36 #273

Open CMKMS-LINZ opened 2 months ago

CMKMS-LINZ commented 2 months ago

Bug Description

Attempting to activate the Gazetteer plugin on startup in QGIS 3.34 and 3.36 produces an error:

QgsEditFormConfig.setInitCodeSource(): argument 1 has unexpected type 'int'

The plugin window still opens and the database appears to remain editable through the GUI. However, the six spatial layers are not created and all spatial tools with the plugin remains greyed out. It does create a single Gazetteer feture refpt layer, but this is not connected to the database.

ie, there is no representation of the geometry or ability to edit it.

Based on the error log the plugin may use a now depreciated component.

The last version of QGIS confirmed to work is 3.28.0-Firenze, but we haven't installed every version between 3.28 and 3.34 to determine which breaks the plugin.

Steps to Reproduce

  1. Click the plugin icon.

2024-04-10T12:11:05 WARNING warning:C:\PROGRA~1\QGIS33~1.1\apps\Python39\lib\site-packages\past\types\oldstr.py:23: DeprecationWarning: invalid escape sequence \d """

         traceback: File "C:\Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NZGBplugin\Plugin.py", line 267, in _run
          self._createEditor()
          File "C:\Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NZGBplugin\Plugin.py", line 243, in _createEditor
          self._editor = Editor(self._iface.mainWindow())
          File "C:\Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NZGBplugin\LINZ\gazetteer\gui\Editor.py", line 27, in __init__
          from .NameSearchWidget import NameSearchDock
          File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 850, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "C:\Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NZGBplugin\LINZ\gazetteer\gui\NameSearchWidget.py", line 20, in 
          from LINZ.Widgets import QtUtils
          File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1058, in _handle_fromlist
          File "", line 228, in _call_with_frames_removed
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 850, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "C:\Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NZGBplugin\LINZ\Widgets\QtUtils.py", line 13, in 
          from past.builtins import cmp
          File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 850, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS33~1.1\apps\Python39\lib\site-packages\past\builtins\__init__.py", line 43, in 
          from past.builtins.noniterators import (filter, map, range, reduce, zip)
          File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 850, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS33~1.1\apps\Python39\lib\site-packages\past\builtins\noniterators.py", line 24, in 
          from past.types import basestring
          File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 850, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS33~1.1\apps\Python39\lib\site-packages\past\types\__init__.py", line 25, in 
          from .oldstr import oldstr
          File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 846, in exec_module
          File "", line 983, in get_code
          File "", line 913, in source_to_code
          File "", line 228, in _call_with_frames_removed

Desktop

Screenshots

image

image