-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Export just 3 reach records out of the demo dataset (with datenherr): OK
Export all records, new digitized records not all with datenherr: Error
Ein Fehler trat bei der Ausführung von Python-Code auf:
sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) null value in column "datenherrref" of relation "vsa_baseclass" violates not-null constraint DETAIL: Failing row contains (10, null, null). [SQL: INSERT INTO pg2ili_abwasser.vsa_baseclass (t_id, datenherrref, datenlieferantref) VALUES (%(t_id)s, %(datenherrref)s, %(datenlieferantref)s)] [parameters: ({'t_id': 10, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 11, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 12, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 13, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 14, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 15, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 16, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 17, 'datenherrref': 5, 'datenlieferantref': 6} ... displaying 10 of 106 total bound parameter sets ... {'t_id': 114, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 115, 'datenherrref': 5, 'datenlieferantref': 6})] (Background on this error at: http://sqlalche.me/e/13/gkpj)
Traceback (most recent call last):
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\engine\base.py", line 1256, in _execute_context1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\dialects\postgresql\psycopg2.py", line 912, in do_executemany
self.dialect.do_executemany(
File "C:\PROGRA
cursor.executemany(statement, parameters)
psycopg2.errors.NotNullViolation: null value in column "datenherrref" of relation "vsa_baseclass" violates not-null constraint
DETAIL: Failing row contains (10, null, null).
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 474, in actionExportClicked
self.interlisImporterExporter.action_export()
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter.py", line 129, in action_export
raise exception
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter.py", line 113, in action_export
self._action_export()
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter.py", line 335, in _action_export
self._export_to_intermediate_schema(
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter.py", line 411, in _export_to_intermediate_schema
twwInterlisExporter.tww_export()
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 61, in tww_export
raise exception
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 56, in tww_export
self._tww_export()
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 75, in _tww_export
self._export_channel()
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 199, in _export_channel
self.abwasser_session.flush()
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\session.py", line 2540, in flush1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\session.py", line 2682, in flush
self._flush(objects)
File "C:\PROGRA
transaction.rollback(capture_exception=True)
File "C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.raise(
File "C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise
raise exception
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\session.py", line 2642, in _flush1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 422, in execute
flush_context.execute()
File "C:\PROGRA
rec.execute(self)
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 586, in execute1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\persistence.py", line 239, in save_obj
persistence.save_obj(
File "C:\PROGRA
_emit_insert_statements(
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\persistence.py", line 1083, in _emit_insert_statements1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\engine\base.py", line 1011, in execute
c = cached_connections[connection].execute(statement, multiparams)
File "C:\PROGRA
return meth(self, multiparams, params)
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\sql\elements.py", line 298, in _execute_on_connection1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\engine\base.py", line 1124, in _execute_clauseelement
return connection._execute_clauseelement(self, multiparams, params)
File "C:\PROGRA
ret = self.execute_context(
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\engine\base.py", line 1316, in _execute_context1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\engine\base.py", line 1510, in handle_dbapi_exception
self._handle_dbapi_exception(
File "C:\PROGRA
util.raise(
File "C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise
raise exception
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\engine\base.py", line 1256, in _execute_context1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\dialects\postgresql\psycopg2.py", line 912, in do_executemany
self.dialect.do_executemany(
File "C:\PROGRA
cursor.executemany(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) null value in column "datenherrref" of relation "vsa_baseclass" violates not-null constraint
DETAIL: Failing row contains (10, null, null).
[SQL: INSERT INTO pg2ili_abwasser.vsa_baseclass (t_id, datenherrref, datenlieferantref) VALUES (%(t_id)s, %(datenherrref)s, %(datenlieferantref)s)]
[parameters: ({'t_id': 10, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 11, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 12, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 13, 'datenherrref': None, 'datenlieferantref': None}, {'t_id': 14, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 15, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 16, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 17, 'datenherrref': 5, 'datenlieferantref': 6} ... displaying 10 of 106 total bound parameter sets ... {'t_id': 114, 'datenherrref': 5, 'datenlieferantref': 6}, {'t_id': 115, 'datenherrref': 5, 'datenlieferantref': 6})]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
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:/PROGRA1/QGIS3/apps/qgis-ltr/./python1/QGIS3/apps/qgis-ltr/./python/plugins
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
C:\PROGRA1\QGIS3\apps\grass\grass82\etc\python1\QGIS3\apps\Python39\DLLs
C:\Windows\system32
C:\Program Files\QGIS3\bin\python39.zip
C:\PROGRA
C:\PROGRA1\QGIS3\apps\Python39\lib1\QGIS3\apps\Python39
C:\Program Files\QGIS3\bin
C:\PROGRA
C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages1\QGIS3\apps\Python39\lib\site-packages\win32
C:\PROGRA
C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\win32\lib1\QGIS3\apps\Python39\lib\site-packages\Pythonwin
C:\PROGRA
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....
.