teksi / wastewater

[DEV] Future TEKSI wastewater module, adapted data model to fit VSA-DSS 2020 new standard
https://teksi.github.io/wastewater
GNU General Public License v3.0
2 stars 5 forks source link

digitize drainage channel: error #81

Closed urskaufmann closed 8 months ago

urskaufmann commented 8 months ago

Click with i-Button on record in vw_tww_wastewater_structure. Choose Aktionen / Digitize: OK Choose Aktionen / Digitize Drainage Channel: Immediately got this error:

Fehler bei der Ausführung folgenden Codes: from teksi_wastewater_plugin.gui import forms

import teksi_wastewater_plugin

feature = next( QgsProject.instance().mapLayer('od_wastewater_structure').getFeatures( QgsFeatureRequest().setFilterExpression( 'obj_id = \'{}\''.format( 'ch000000WS000002' ) ) ) ) teksi_wastewater_plugin.gui.forms.digitizeDrainageChannel(feature.id(), 'od_wastewater_structure')

Traceback (most recent call last): File "", line 1, in File "C:\PROGRA~1/QGIS3/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\gui....\teksi_wastewater_plugin.py", line 40, in from .gui.twwprofiledockwidget import TwwProfileDockWidget File "C:\PROGRA~1/QGIS3/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: attempted relative import with no known parent package

Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]

QGIS-Version: 3.28.6-Firenze 'Firenze', 868c9fa03b

Python-Pfad: ['C:/PROGRA~1/QGIS3/apps/qgis-ltr/./python', 'C:/Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python', 'C:/Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins', 'C:/PROGRA~1/QGIS3/apps/qgis-ltr/./python/plugins', 'C:\PROGRA~1\QGIS3\apps\grass\grass82\etc\python', 'C:\Windows\system32', 'C:\Program Files\QGIS3\bin\python39.zip', 'C:\PROGRA~1\QGIS3\apps\Python39\DLLs', 'C:\PROGRA~1\QGIS3\apps\Python39\lib', 'C:\Program Files\QGIS3\bin', 'C:\PROGRA~1\QGIS3\apps\Python39', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\win32', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\Pythonwin', 'C:/Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python', 'T:/12_GIS/01_QGIS/QGEP/qgep-test/tww_project_2020/test', 'C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\gui\..\..', '.']

3nids commented 8 months ago

fixed in last project

3nids commented 8 months ago

(in the plugin branch)

urskaufmann commented 8 months ago

Still get Error:

Fehler bei der Ausführung folgenden Codes: from teksi_wastewater.gui import forms

import teksi_wastewater

feature = next( QgsProject.instance().mapLayer('od_wastewater_structure').getFeatures( QgsFeatureRequest().setFilterExpression( 'obj_id = \'{}\''.format( 'ch080qwzNS000052' ) ) ) ) teksi_wastewater.gui.forms.digitizeDrainageChannel(feature.id(), 'od_wastewater_structure')

Traceback (most recent call last): File "", line 6, in File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\gui\forms.py", line 22, in digitizeDrainageChannel tool = TwwMapToolDigitizeDrainageChannel(qgis.utils.plugins["twwplugin"].iface, layer) KeyError: 'twwplugin'

Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]

QGIS-Version: 3.28.6-Firenze 'Firenze', 868c9fa03b

Python-Pfad: ['C:/PROGRA~1/QGIS3/apps/qgis-ltr/./python', 'C:/Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python', 'C:/Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins', 'C:/PROGRA~1/QGIS3/apps/qgis-ltr/./python/plugins', 'C:\PROGRA~1\QGIS3\apps\grass\grass82\etc\python', 'C:\Program Files\QGIS3\bin', 'C:\Program Files\QGIS3\bin\python39.zip', 'C:\PROGRA~1\QGIS3\apps\Python39\DLLs', 'C:\PROGRA~1\QGIS3\apps\Python39\lib', 'C:\PROGRA~1\QGIS3\apps\Python39', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\win32', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\Pythonwin', 'C:/Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python', 'T:/12_GIS/01_QGIS/QGEP/qgep-test/tww_project_2020/test kau']

3nids commented 8 months ago

new plugin zip in discussion (I retried successfuly)

urskaufmann commented 8 months ago

No digitize drainage channel works. But I get an error when installing the plugin (see below). The plugin is nevertheless successfully installed image