Skip to content
Advertisement

Tag: database-connection

How to add a cursor() of a db connection to a sqlalchemy.orm session? “sqlalchemy.orm.exc.UnmappedInstanceError: Class ‘builtins.int’ is not mapped”

I am in a Ubuntu 22.04 Docker container with Python 3.10. I use these apt packages: I use the following Python packages: The sessionmaker parameter autoflush is set to True. I want to add a deletion and after that an insertion to a sqlalchemy.orm session so that I commit only when the two commands worked out well. The aim of

Can I connect to mysql using Psycopg2 lib

I have a project in python that connects to a postgreSQL database. That project have a module that connects to other data base. The connection string is on a configuration file. I configure it to use a mysql database like this: One running the module I always get the following error: line 179, in connect connection_factory=connection_factory, async=async) psycopg2.OperationalError: FATAL: password

Advertisement