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

2024 12 11 fix ara bauwerk export 2nd attempt #184

Merged
merged 305 commits into from
Dec 20, 2024

Conversation

sjib
Copy link
Contributor

@sjib sjib commented Dec 11, 2024

replaces #178
rebased on master (11.12.2024)

@sjib sjib self-assigned this Dec 11, 2024
@sjib sjib marked this pull request as draft December 11, 2024 13:20
@sjib sjib added the enhancement New feature or request label Dec 11, 2024
@sjib
Copy link
Contributor Author

sjib commented Dec 12, 2024

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

AttributeError: 'QgepExportUtils' object has no attribute 'export_organisation' 
Traceback (most recent call last):
  File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testingdev165_2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\gui\__init__.py", line 672, in action_do_export
    qgep_export_sia405(
  File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testingdev165_2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\qgepsia405\export.py", line 195, in qgep_export_sia405
    qgep_export_utils.export_organisation()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'QgepExportUtils' object has no attribute 'export_organisation'

@sjib
Copy link
Contributor Author

sjib commented Dec 12, 2024

File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/qgepsia405/export.py", line 125, in qgep_export_sia405
    subset_wws_ids = remove_from_selection(subset_wws_ids, ws_off_sia405abwasser_list)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/utils/qgep_export_utils.py", line 483, in remove_from_selection
    for list_item in remove_ids:
                     ^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

@sjib
Copy link
Contributor Author

sjib commented Dec 12, 2024

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

sqlalchemy.exc.ArgumentError: ON clause, typically a SQL expression or ORM relationship attribute expected, got . 
Traceback (most recent call last):
  File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testingdev165_2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\gui\__init__.py", line 672, in action_do_export
    qgep_export_sia405(
  File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testingdev165_2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\qgepsia405\export.py", line 357, in qgep_export_sia405
    qgep_export_utils.export_dryweather_downspout()
  File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testingdev165_2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\qgep_export_utils.py", line 564, in export_dryweather_downspout
    query = query.join(
            ^^^^^^^^^^^
  File "", line 2, in join
  File "C:\Users\Stefan\AppData\Roaming\Python\Python312\site-packages\sqlalchemy\sql\base.py", line 279, in _generative
    x = fn(self, *args, **kw)
        ^^^^^^^^^^^^^^^^^^^^^
  File "", line 2, in join
  File "C:\Users\Stefan\AppData\Roaming\Python\Python312\site-packages\sqlalchemy\orm\base.py", line 306, in generate
    fn(self, *args, **kw)
  File "C:\Users\Stefan\AppData\Roaming\Python\Python312\site-packages\sqlalchemy\orm\query.py", line 2429, in join
    onclause_element = coercions.expect(
                       ^^^^^^^^^^^^^^^^^
  File "C:\Users\Stefan\AppData\Roaming\Python\Python312\site-packages\sqlalchemy\sql\coercions.py", line 395, in expect
    resolved = impl._literal_coercion(
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Stefan\AppData\Roaming\Python\Python312\site-packages\sqlalchemy\sql\coercions.py", line 909, in _literal_coercion
    self._raise_for_expected(element)
  File "C:\Users\Stefan\AppData\Roaming\Python\Python312\site-packages\sqlalchemy\sql\coercions.py", line 518, in _raise_for_expected
    raise exc.ArgumentError(msg, code=code) from err
sqlalchemy.exc.ArgumentError: ON clause, typically a SQL expression or ORM relationship attribute expected, got .

@sjib
Copy link
Contributor Author

sjib commented Dec 12, 2024

Selection with ARABauwerk works
20241212_export_sia405_abwasser_selection_arabw
241212qgep-export_sel_arabw_SIA405_ABWASSER_2015_LV95.zip

@sjib
Copy link
Contributor Author

sjib commented Dec 12, 2024

 Traceback (most recent call last):
  File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/tests/test_qgep.py", line 232, in test_case_f_export_selection_sia405
    main(
  File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/__init__.py", line 214, in main
    qgep_export_sia405(
  File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/qgepsia405/export.py", line 86, in qgep_export_sia405
    adapted_subset_ids = add_to_selection(adapted_subset_ids, connected_overflow_to_wn_ids)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/utils/qgep_export_utils.py", line 1190, in add_to_selection
    for list_item in add_ids:
                     ^^^^^^^
TypeError: 'NoneType' object is not iterable

@sjib
Copy link
Contributor Author

sjib commented Dec 18, 2024

Why do selection and subset_ids_original get changed?

2024-12-18T23:02:48 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:reprint subset_ids_original: ['ch080qwzHA001343', 'ch080qwzAK001341', 'ch080qwzHA000146']
2024-12-18T23:02:48 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:reprint subset_ids: ['ch080qwzHA001343', 'ch080qwzAK001341', 'ch080qwzHA000146']

@sjib
Copy link
Contributor Author

sjib commented Dec 19, 2024

Should solve #177

@sjib sjib removed the request for review from domi4484 December 19, 2024 07:48
@sjib sjib added this to the Datamodel 1.6.4 Plugin 1.6.6 milestone Dec 19, 2024
@sjib
Copy link
Contributor Author

sjib commented Dec 19, 2024

@ponceta This should be ready to be merged. Further enhancement are placed in new issues and will follow later so that we can make a relase 1.6.6 till tomorrow.

@sjib
Copy link
Contributor Author

sjib commented Dec 19, 2024

Needs #183 so that VSA-KEK export is also working correctly.

@ponceta ponceta requested a review from domi4484 December 19, 2024 09:30
@ponceta
Copy link
Member

ponceta commented Dec 19, 2024

@domi4484 could you have a look at this before merging?

@ponceta ponceta closed this Dec 20, 2024
@ponceta ponceta reopened this Dec 20, 2024
@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

Successful export of VSA-KEK:
grafik

@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

My tests are all ok

  • DSS
  • DSS Selection
  • DSS Selection wwtp
  • SIA405
  • SIA405 selection paa
  • SIA405 selection wwtp
  • VSA-KEK
  • VSA-KEK selection

@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

to check: abwasserbauwerkRef and abwassernetzelementRef

  • DSS 282 / 199
  • DSS Selection SAA 8/6
  • DSS Selection wwtp 15 / 6
  • SIA405 Abwasser 283 / 0 - ERROR - to check code
  • SIA405 Abwasser selection SAA 7 / 4
  • SIA405 Abwasser selection wwtp 12/6

@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

  • SIA405 Abwasser 253 / 193 ok
  • SIA405 Abwasser selection SAA 7 / 4 ok
  • SIA405 Abwasser selection wwtp 12/6 ok

@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

@ponceta From my side ready to merge

@ponceta ponceta added the fix label Dec 20, 2024
@ponceta ponceta merged commit d641adc into master Dec 20, 2024
5 checks passed
@ponceta ponceta deleted the 2024-12-11-fix-ara-bauwerk-export-2nd-attempt branch December 20, 2024 14:24
@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

Should also solve QGEP/QGEP#856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants