#404 ipsilon-server-install fails on Fedora 40 (sqlalchemy 2.0)
Closed: Fixed a month ago by abompard. Opened 8 months ago by ryanlerch.

sqlalchemy is updated to 2.0 in fedora 40, which i think is causing this issue when trying to use ipsilon-server-install:

Traceback (most recent call last):
  File "/usr/sbin/ipsilon-server-install", line 543, in <module>
    install(fplugins, opts)
  File "/usr/sbin/ipsilon-server-install", line 200, in install
    dbupgrade.execute_upgrade(ipsilon_conf)
  File "/usr/lib/python3.12/site-packages/ipsilon/tools/dbupgrade.py", line 73, in execute_upgrade
    if _upgrade_database(adminstore) not in [True, None]:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/tools/dbupgrade.py", line 29, in _upgrade_database
    current_version = datastore._get_schema_version()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/util/data.py", line 800, in _get_schema_version
    q = self._query(self._db, 'dbinfo', OPTIONS_TABLE, trans=False)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/util/data.py", line 167, in __init__
    self._table = self._get_table(table, table_def)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipsilon/util/data.py", line 212, in _get_table
    table = Table(name, MetaData(self._db.engine()), *table_creation)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/sql/schema.py", line 5470, in __init__
    raise exc.ArgumentError(
sqlalchemy.exc.ArgumentError: expected schema argument to be a string, got <class 'sqlalchemy.engine.base.Engine'>.
[2024-05-07 02:53:13,464] Installation aborted.

This problem of course persists in FC41 since SQLAlchemy 2.0 is not backwards compatible, in addition to this imghdr which is used in config.py was deprecated and is no longer available.

(I tried resolving the MetaData issue, but the whole stack needs a rewrite it would seem, if I have time...)

I've fixed the MetaData thing a few months ago, but it's not in a released version.

Metadata Update from @abompard:
- Custom field component adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

2 months ago

Can confirm that using your patches of util/data.py fixes ipsilon on fedora 41, time for a new release? @abompard

It should work with the latest release.

Metadata Update from @abompard:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

a month ago

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #408 Merged 5 months ago