Skip to content

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

@fllsilva

Description

@fllsilva

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions