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

Python error opening Gazetteer feature refpt attribute table #214

Open CMKMS-LINZ opened 4 years ago

CMKMS-LINZ commented 4 years ago

Bug Description

For any name, opening the Gazetteer feature refpt for the name that is currently open in the Gazetteer editor, first throws up two python errors, then opens anyway.

Steps to Reproduce

  1. Search any name
  2. Open the name entry
  3. Right click on Gazetteer feature refpt and select Open Attribute Table
  4. Get errors.

Error 1

An error occurred during execution of following code: openFeatRefPointForm( _qgis_featureform_3_2, _qgis_layer_Gazetteer_feature_refpt_70eb35bf_3f4a_4f1a_895d_11871f4c9fbf_2, _qgis_feature_20200910152143965)

Traceback (most recent call last): File "", line 1, in File "", line 81, in openFeatRefPointForm AttributeError: 'QgsAttributeForm' object has no attribute 'accept'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]

QGIS version: 3.14.0-Pi 'Pi', 9f7028fd23

Python path: ['C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python/plugins\NZGBplugin', 'C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python', 'C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python', 'C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python/plugins', 'C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\Scripts', 'C:\Program Files\QGIS 3.14\bin\python37.zip', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\DLLs', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib', 'C:\Program Files\QGIS 3.14\bin', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\win32', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\win32\lib',

Error 2 (appears to be identical)

An error occurred during execution of following code: openFeatRefPointForm( _qgis_featureform_3_2, _qgis_layer_Gazetteer_feature_refpt_70eb35bf_3f4a_4f1a_895d_11871f4c9fbf_2, _qgis_feature_20200910152156712)

Traceback (most recent call last): File "", line 1, in File "", line 81, in openFeatRefPointForm AttributeError: 'QgsAttributeForm' object has no attribute 'accept'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]

QGIS version: 3.14.0-Pi 'Pi', 9f7028fd23

Python path: ['C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python/plugins\NZGBplugin', 'C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python', 'C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python', 'C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python/plugins', 'C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\Scripts', 'C:\Program Files\QGIS 3.14\bin\python37.zip', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\DLLs', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib', 'C:\Program Files\QGIS 3.14\bin', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\win32', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\Pythonwin', 'C:/Users/cstephens/AppData/Roaming/QGIS/QGIS3\profiles\Tester/python']

Desktop

Screenshots

image

SPlanzer commented 4 years ago

Bug triage for QGIS3 initial release

This is bug has been introduced via porting.

Next steps

Investigate root cause and fix ready for 2.0.2 release

SPlanzer commented 4 years ago

This is bug has been introduced via porting.

Looking at the source code the statement above cannot be true.

The form with its accept button for creating features is triggered when opening the Gazetteer feature refpt table. This has always been the case and the QGIS2 version will no-doubt throw the same error.

I am de-prioritising this for now as the current focus in on newly introduced bugs