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
1 stars 5 forks source link

decode error on interlis export #220

Closed cymed closed 4 months ago

cymed commented 4 months ago

When trying to export any model based on the prerealease plugin, I get the following error:

Traceback (most recent call last): File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksiwastewater\interlis\utils\various.py", line 59, in exec proc = subprocess.run( File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command ''C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe' -jar 'C:\Users\usr\AppData\Roaming\QGIS\QGIS3\profiles\teksi\python\plugins\teksi_wastewater\libs\modelbaker\iliwrapper\bin\ili2pg-5.0.1\ili2pg-5.0.1.jar' --schemaimport --dbhost '192.168.1.25' --dbport '5432' --dbusr 'usr' --dbpwd 'passwort' --dbdatabase 'tww' --dbschema pg2ili_abwasser --setupPgExt --createGeomIdx --createFk --createFkIdx --createTidCol --importTid --noSmartMapping --defaultSrsCode 2056 --log 'C:/Users/usr/Downloads/tww-export.xtf.240424134439.ili2pg-schemaimport.log' --nameLang de --models 'DSS_2020_1_LV95'' returned non-zero exit status 1.

         During handling of the above exception, another exception occurred:

         Traceback (most recent call last):
          File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 470, in actionExportClicked
          self.interlisImporterExporter.action_export()
          File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 140, in action_export
          raise exception
          File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/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/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 175, in interlis_export
          self._create_ili_schema(export_models, create_basket_col=create_basket_col)
          File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 468, in _create_ili_schema
          self.interlisTools.import_ili_schema(
          File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksi_wastewater\interlis\utils\ili2db.py", line 45, in import_ili_schema
          exec_(
          File "C:\Users/usr/AppData/Roaming/QGIS/QGIS3\profiles\teksi/python/plugins\teksi_wastewater\interlis\utils\various.py", line 70, in exec_
          logger.exception(e.output.decode("windows-1252" if os.name == "nt" else "utf-8"))
          File "C:\OSGeo4W\apps\Python39\lib\encodings\cp1252.py", line 15, in decode
          return codecs.charmap_decode(input,errors,decoding_table)
         UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 12: character maps to 
e.output: b'Die Syntax f\x81r den Dateinamen, Verzeichnisnamen oder die Datentr\x84gerbezeichnung ist falsch.\r\n'
os.name: nt
sjib commented 4 months ago

@cymed Auf welchem Betriebssystem geschieht dies?

cymed commented 4 months ago

Windows

domi4484 commented 4 months ago

Probably windows doesn't like the single quoted arguments introduced in #203. Could you try with the plugin from pr #221 please?

https://github.com/teksi/wastewater/actions/runs/8818917485/artifacts/1443754048

cymed commented 4 months ago

221 works