Skip to content

Exception ignored in: <function Connection.__del__ at ...> connection shutdown. #51

Open
@fdcastel

Description

@fdcastel

Running this code:

# requires `pandas` and `sqlalchemy-firebird` packages.
import sqlalchemy as sa
import pandas as pd

def main():
    db_uri = "firebird://..."  # any database
    q = 'SELECT COUNT(*) FROM mon$attachments'

    e = sa.create_engine(db_uri)
    with e.connect() as conn:
        df = pd.read_sql(sql=sa.text(q), con=conn)
        print(df)

    print('----- [ END OF MAIN ] -----')

if __name__ == "__main__":
    main()

outputs:

   COUNT
0      3
----- [ END OF MAIN ] -----
Exception ignored in: <function Connection.__del__ at 0x000001BA5CAFD6C0>
Traceback (most recent call last):
  File "C:\Temp\sqla\python3-driver\src\firebird\driver\core.py", line 1802, in __del__
    self._att.detach()
  File "C:\Temp\sqla\python3-driver\src\firebird\driver\interfaces.py", line 1214, in detach
    self._check()
  File "C:\Temp\sqla\python3-driver\src\firebird\driver\interfaces.py", line 141, in _check
    raise self.__report(DatabaseError, self.status.get_errors())
firebird.driver.types.DatabaseError: connection shutdown

using latest master of python3-driver.

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