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

QGEP 1.62, Export DSS, position is an invalid keyword #854

Open
urskaufmann opened this issue May 13, 2024 · 2 comments
Open

QGEP 1.62, Export DSS, position is an invalid keyword #854

urskaufmann opened this issue May 13, 2024 · 2 comments

Comments

@urskaufmann
Copy link

Describe the bug
When exporting INTERLIS VSA-DSS with QGEP 1.6.2, I get this error

Ein Fehler trat bei der Ausführung von Python-Code auf:
TypeError: 'position' is an invalid keyword argument for rohrprofil_geometrie
Traceback (most recent call last):
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\qgep161_prerealise/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\gui_init_.py", line 613, in action_do_export
qgepdss_export(selection=export_dialog.selected_ids, labels_file=labels_file_path, orientation=eorientation)
File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\qgep161_prerealise/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\qgepdss\export.py", line 2097, in qgep_export
rohrprofil_geometrie = ABWASSER.rohrprofil_geometrie(
File "", line 4, in init
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\state.py", line 433, in _initialize_instance
manager.dispatch.init_failure(self, args, kwargs)
File "C:\PROGRA
1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.raise_(
File "C:\PROGRA1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise_
raise exception
File "C:\PROGRA
1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\orm\state.py", line 430, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "", line 6, in init
File "", line 6, in init
File "C:\PROGRA~1\QGIS3\apps\Python39\lib\site-packages\sqlalchemy\ext\declarative\base.py", line 839, in _declarative_constructor
raise TypeError(
TypeError: 'position' is an invalid keyword argument for rohrprofil_geometrie

Python-Version: 3.9.18 (heads/master:5eba59e, Feb 1 2024, 20:02:10) [MSC v.1929 64 bit (AMD64)]
QGIS-Version: 3.34.4-Prizren Prizren, decd43dc

Desktop (please complete the following information):

  • QGEP plugin version 1.6.2
  • QGEP datamodel version 1.6.1
  • QGEP project file version -
  • QGIS Version 3.34.4
  • OS WIn10
@sjib sjib added bug labels May 13, 2024
@sjib sjib self-assigned this May 13, 2024
@sjib
Copy link
Contributor

sjib commented May 13, 2024

Problem is with the matching here: Should be aposition=row.position instead of position=row.position

 rohrprofil_geometrie = ABWASSER.rohrprofil_geometrie(
            # FIELDS TO MAP TO ABWASSER.rohrprofil_geometrie
            # --- baseclass ---
            # --- sia405_baseclass ---
            **base_common(row, "rohrprofil_geometrie"),
            # --- rohrprofil_geometrie ---

            position=row.position,
            rohrprofilref=get_tid(row.fk_pipe_profile__REL),
            x=row.x,
            y=row.y,
        )

https://github.com/QGEP/qgepqwat2ili/blob/ef399256541b380d5f61863f9b5607a6506d09fc/qgepqwat2ili/qgepdss/export.py#L2097

20240513_export_interlis_rohrprofil_geometrie_aposition_statt_position

  • To be fixed in all three modell variants qgep, gepdss and qgepsia405

@sjib
Copy link
Contributor

sjib commented Jun 3, 2024

For future reference:

List of special matchings INTERLIS Import / Export ili2db:
Attributes:

  • rohrprofil_geometrie.aposition
  • abwasserbauwerk.astatus
  • erhaltungsereignis.astatus
  • hydr_kennwerte.astatus
  • organisation.auid

Tables:

  • table zone is azone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants