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

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

Open
maurerle opened this issue Feb 13, 2024 · 2 comments
Open

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

maurerle opened this issue Feb 13, 2024 · 2 comments

Comments

@maurerle
Copy link

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?

@jh-RLI
Copy link
Contributor

jh-RLI commented Apr 12, 2024

Updating the sql-achemy version in oedialect has not been possible until now. We can take a look at it and maybe update it. My resources to work on it are rather limited at the moment. I will do my best ;)

@nesnoj
Copy link
Member

nesnoj commented Apr 15, 2024

Updating the sql-achemy version in oedialect has not been possible until now. We can take a look at it and maybe update it. My resources to work on it are rather limited at the moment. I will do my best ;)

Thank you @jh-RLI !

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

No branches or pull requests

3 participants