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

Record is imported even if not using PostgreSQL #23

Closed
HarrySky opened this issue Oct 28, 2020 · 2 comments
Closed

Record is imported even if not using PostgreSQL #23

HarrySky opened this issue Oct 28, 2020 · 2 comments

Comments

@HarrySky
Copy link
Contributor

Currently in model.py Record is imported without checks in place whether user even have asyncpg installed:

from databases.backends.postgres import Record

It causes my app that use SQLite to crash with ModuleNotFoundError: No module named 'asyncpg'

One possible solution is to wrap it in try-except ModuleNotFoundError block, another - refactor check in Model.extract_prefixed_table_columns. Your thoughts?

It seems that tests are running with all backends and those kind of errors are not catched

@collerek
Copy link
Owner

Should be fixed in #24.
Please update to last version and check.

@HarrySky
Copy link
Contributor Author

Yes, fixed, thanks a lot for quick patch 😄

I am experiencing other problems, will open issues in a moment

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

2 participants