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

Improve exception log messages #1519

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Conversation

lucasbrahm
Copy link
Contributor

This PR is to improve the exception message I faced when running Tortoise.init with the option _create_db=True. This creates a connection without database set. But asyncpg library internally try to set database as os.getenv('PGDATABASE') or as the db username otherwise. This issue happened to me when running with WSL + docker; the exception error message gave me no clue what was happening. So, after a lot of debugging, all I had to do was to set 'PGDATABASE' environment as 'postgres'.

@abondar abondar merged commit 37183b4 into tortoise:develop Apr 27, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants