Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERLIS Export - AttributeError: 'InterlisExporterToIntermediateSchema' object has no attribute 'get_pk' #188

Closed
sjib opened this issue Mar 29, 2024 · 3 comments · Fixed by #191
Assignees
Labels
bug Something isn't working INTERLIS About INTERLIS exchange format (import / export)

Comments

@sjib
Copy link
Contributor

sjib commented Mar 29, 2024

Export to SIA405 Abwasser, no labels:

`Traceback (most recent call last):
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 470, in actionExportClicked
self.interlisImporterExporter.action_export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 140, in action_export
raise exception
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 111, in action_export
self.interlis_importer_exporter.interlis_export(
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 170, in interlis_export
self._export_to_intermediate_schema(
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 321, in _export_to_intermediate_schema
twwInterlisExporter.tww_export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 74, in tww_export
raise exception
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 69, in tww_export
self._export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 84, in _export
self._export_sia405_abwasser()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 194, in _export_sia405_abwasser
self._export_reach_progression_alternative()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 768, in _export_reach_progression_alternative
haltungref=self.get_pk(row.fk_reach__REL),
AttributeError: 'InterlisExporterToIntermediateSchema' object has no attribute 'get_pk'

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.4-Firenze Firenze, fd0fb72ab3

Python-Pfad:
C:/PROGRA1/QGIS 3.28.4/apps/qgis-ltr/./python
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins
C:/PROGRA
1/QGIS 3.28.4/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.28.4\bin\python39.zip
C:\PROGRA1\QGIS 3.28.4\apps\Python39\DLLs
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib
C:\Program Files\QGIS 3.28.4\bin
C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages
C:\PROGRA1\QGIS 3.28.4\apps\Python39
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib\site-packages
C:\PROGRA1\QGIS 3.28.4\apps\Python39\lib\site-packages\win32
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.28.4\apps\Python39\lib\site-packages\Pythonwin
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python
C:/Daten/QGEP/testing_dss2020/20240305
C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui....
.`

@sjib sjib added bug Something isn't working INTERLIS About INTERLIS exchange format (import / export) labels Mar 29, 2024
@sjib
Copy link
Contributor Author

sjib commented Mar 29, 2024

Same problem with VSA-DSS Export:

`in Fehler trat bei der Ausführung von Python-Code auf:

AttributeError: 'InterlisExporterToIntermediateSchema' object has no attribute 'get_pk'
Traceback (most recent call last):
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 470, in actionExportClicked
self.interlisImporterExporter.action_export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 140, in action_export
raise exception
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 111, in action_export
self.interlis_importer_exporter.interlis_export(
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 170, in interlis_export
self._export_to_intermediate_schema(
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 321, in _export_to_intermediate_schema
twwInterlisExporter.tww_export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 74, in tww_export
raise exception
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 69, in tww_export
self._export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 84, in _export
self._export_sia405_abwasser()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 194, in _export_sia405_abwasser
self._export_reach_progression_alternative()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 768, in _export_reach_progression_alternative
haltungref=self.get_pk(row.fk_reach__REL),
AttributeError: 'InterlisExporterToIntermediateSchema' object has no attribute 'get_pk'

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.4-Firenze Firenze, fd0fb72ab3

Python-Pfad:
C:/PROGRA1/QGIS 3.28.4/apps/qgis-ltr/./python
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins
C:/PROGRA
1/QGIS 3.28.4/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.28.4\bin\python39.zip
C:\PROGRA1\QGIS 3.28.4\apps\Python39\DLLs
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib
C:\Program Files\QGIS 3.28.4\bin
C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages
C:\PROGRA1\QGIS 3.28.4\apps\Python39
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib\site-packages
C:\PROGRA1\QGIS 3.28.4\apps\Python39\lib\site-packages\win32
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.28.4\apps\Python39\lib\site-packages\Pythonwin
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python
C:/Daten/QGEP/testing_dss2020/20240305
C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui....
.`

@domi4484
Copy link
Contributor

domi4484 commented Apr 1, 2024

@sjib the automatic test should have catched this one. I'll try to figure out what is wrong there.

I started a fix to this (#191) but could not finished it. I am in vacation so I hope it can wait till next week

@sjib
Copy link
Contributor Author

sjib commented Apr 8, 2024

I started a fix to this (#191) but could not finished it. I am in vacation so I hope it can wait till next week

@domi4484 I hope you had good holidays. All the TEKSI members are waiting for the new relase since end of March - so I hope you can fix this quickly. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working INTERLIS About INTERLIS exchange format (import / export)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants