Re: QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_conne
I don't know Python/Qt, but do you perhaps have a separate QSqlDatabase.addDatabase call somewhere else in your code? Since you don't specify a connection name, the connection becomes the default connection and if you have another QSqlDatabase::addDatabase somewhere else in your code that does not specify a connection name, that is likely the source of the duplicate connection name.
Either specify the connection name for both or one of those and it should resolve your problem.
Good luck!
I write the best type of code possible, code that I want to write, not code that someone tells me to write!
Bookmarks