Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error in sqlalchemy-utils.databse_exists with PostgreSQL 17 #769

Open
fllsilva opened this issue Jan 10, 2025 · 0 comments
Open

Comments

@fllsilva
Copy link

When using the sqlachemy-utils.database_exists() function with PostgreSQL (I'm using version 17), when the database does not exist, the following error occurs:

   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 93: invalid continuation byte

The error occurs on line 488 of the "database.py" module:

    return bool(_get_scalar_result(engine, sa.text(text)))

And the solution for this error is to add the following exception in line 489:

    except (ProgrammingError, OperationalError, UnicodeDecodeError):

Could someone please update the fix in the repository?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant