QGEP / qgepqwat2ili

3 stars 3 forks source link

Upgrade ili binaries distribution #138

Open ponceta opened 6 months ago

ponceta commented 6 months ago

Upgrade ili2pg and ilivalidator

sjib commented 5 months ago

Model VSA_KEK_2019_LV95 requires column T_basket Traceback (most recent call last): File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/utils/various.py", line 50, in exec_ proc = subprocess.run( File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '"java" -jar "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/bin/ili2pg-5.1.0-bindist/ili2pg-5.1.0.jar" --schemaimport --dbhost "127.0.0.1" --dbport "5432" --dbusr "postgres" --dbpwd "postgres" --dbdatabase "qgep_prod" --dbschema pg2ili_abwasser --setupPgExt --createGeomIdx --createFk --createFkIdx --createTidCol --importTid --noSmartMapping --defaultSrsCode 2056 --log "/tmp/qgepqwat2ili/240426132109.ilicreate.log" --nameLang de /home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/ili/VSA_KEK_2019_2_d_LV95-20210120.ili' returned non-zero exit status 1.

Looks like we have to adapt KEK Import with that change with column T_basket

sjib commented 5 months ago

@ponceta I just tested this pullrequest with the new binaries by copying them manually. It does not change anything but still uses the binaries of the ModelBaker version installed. If I do not have ModelBaker installed there is an Error that it is not installed.

A (hacky) work around is to manually also change the ili2db library version in the QGISModelBaker directory of the QGIS profile used - when I change the ili2db files in the QGIS\QGIS3\profiles\default\python\plugins\QgisModelBaker\libili2db\bin\ili2pg-4.5.0 folder (keeping the name of the folder and renaming ili2pg-5.1.0 to ili2pg-4.5.0 ) it seems to work (thanks @DflGruBoe for helping me with this).

I have QGISModelBaker 6.5.2 installed- the last release before it changes to the new architecture with the separate modelbaker library

So we should:

sjib commented 5 months ago

Find out why we still have the need of a ModelBaker installation def configure_from_modelbaker(iface): See https://github.com/QGEP/qgepqwat2ili/blob/ef399256541b380d5f61863f9b5607a6506d09fc/qgepqwat2ili/gui/__init__.py#L826

Maybe adjusting this to v6.5.2 REQUIRED_VERSION = "v6.4.0" # TODO : update once https://github.com/opengisch/QgisModelBaker/pull/473 is released would already help.

sjib commented 5 months ago

Basket handling in ModelBaker see https://opengisch.github.io/QgisModelBaker/background_info/basket_handling/

sjib commented 3 months ago

Here is the adapted ModelBaker6.5.2modqgep.zip that has ili2pg 5.1.0 instead of 4.5.0 (as the SCRAM bug was fixed there)

20240802_modelbaker_with_newer_ili2pg_510_instead_450

sjib commented 3 months ago

QgisModelBaker6.5.99modforqgep.zip

sjib commented 3 months ago

Works with SIA405 Abwasser and VSA-DSS, but creates new problem with VSA-KEK: Model VSA_KEK_2019_LV95 requires column T_basket

2024-08-02T18:19:36     WARNING    Traceback (most recent call last):
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\various.py", line 50, in exec_
              proc = subprocess.run(
              ^^^^^^^^^^^^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\subprocess.py", line 571, in run
              raise CalledProcessError(retcode, process.args,
             subprocess.CalledProcessError: Command '"C:\Program Files\Eclipse Foundation\jre-11.0.12.7-hotspot\bin\java" -jar "C:\Users\Stefan\AppData\Roaming\QGIS\QGIS3\profiles\testplugin163dm162\python\plugins\QgisModelBaker\libili2db\bin\ili2pg-4.5.0\ili2pg-4.5.0.jar" --schemaimport --dbhost "localhost" --dbport "5433" --dbusr "postgres" --dbpwd "sjib" --dbdatabase "qgep_testplugin163dm162" --dbschema pg2ili_abwasser --setupPgExt --createGeomIdx --createFk --createFkIdx --createTidCol --importTid --noSmartMapping --defaultSrsCode 2056 --log "C:/Daten/QGEP/testplugin163dm162/20240802_qgep-export.xtf.240802181933.ili2pg-schemaimport.log" --nameLang de C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\ili\VSA_KEK_2019_2_d_LV95-20210120.ili' returned non-zero exit status 1.

             During handling of the above exception, another exception occurred:

             Traceback (most recent call last):
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\gui\__init__.py", line 499, in action_do_export
              create_ili_schema(
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\ili2db.py", line 184, in create_ili_schema
              exec_(
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\various.py", line 60, in exec_
              raise CmdException(f"Command errored ! See logs for more info.")
             qgepplugin.qgepqwat2ili.qgepqwat2ili.utils.various.CmdException: Command errored ! See logs for more info.
sjib commented 1 month ago

Does https://github.com/QGEP/qgepqwat2ili/milestone/6 solves this also? @ponceta please coordinate!