Skip to content

Ding0 does not run with oedialect anymore with recent versions #400

@maurerle

Description

@maurerle

The NetworkDing0 now needs a engine as param - which is not yet changed in the tests.

The oedialect does not seem to work anymore with latest versions (see OpenEnergyPlatform/oedialect#47).

I tried to fix the packages using newer versions, but ran into the issue that NetworkDing0 did not have a engine at first,
it then did not like oedialect and if I catch this error I run into:

Traceback (most recent call last):
  File "/home/admin/ding0webservice/main.py", line 288, in <module>
    service = Ding0Webservice()
              ^^^^^^^^^^^^^^^^^
  File "/home/admin/ding0webservice/main.py", line 46, in __init__
    self.ding0_builder = Ding0Builder()
                         ^^^^^^^^^^^^^^
  File "/home/admin/ding0webservice/utils/ding0_builder.py", line 37, in __init__
    self._ding0 = NetworkDing0(self._session, name='network')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/ding0/ding0/core/__init__.py", line 167, in __init__
    self._orm = self.import_orm(session)
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/ding0/ding0/core/__init__.py", line 1505, in import_orm
    engine = database.get_engine()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/ding0/ding0/tools/database.py", line 45, in get_engine
    f"{int(cfg_ding0.get('database_credentials', 'port'))}/{cfg_ding0.get('database_credentials', 'name')}",
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'port'

I therefore could not get my application to run with new versions.
Could you help with that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions