Ding0 does not run with oedialect anymore with recent versions
Opened this issue · 2 comments
maurerle commented
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 commented
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 ;)