-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
detecting when a db driver is missing #124
Comments
ACK and working on this |
@edublancas
|
Sure. When we see this error:
We should indicate the user that they're missing a package. In this case, they're missing duckdb-engine. So we should be able to map the error to the missing package (hence keep a list). In this case, the error says |
In #120, we improved the error message displayed when failing to open a connection to a database. However, we're ignoring the error message content and printing a generic message. This leads to a confusing message when the connection string is valid, and the failure is due to another reason.
There are X reasons a connection might fail, but we should at least cover the most common ones. For example, missing a driver (see this). In such case, we should display a more appropriate message like "fix it by installing X package and try again"
I ran a few tests with some sample URIs and the error is always the same
ModuleNotFoundError: No module named 'name'
.The second case we must cover is when the plugin is missing. For example, if we run:
with duckdb-engine installed but duckdb uninstalled, we get:
ModuleNotFoundError: No module named 'duckdb'
(same as the use case described above).However, if we uninstall duckdb-engine (regardless of duckdb installed or not), we get:
NoSuchModuleError
could be either a typo or an actual plugin missing (in this case, the duckdb-engine plugin is missing). So we should keep a list of plugins to distinguish between the two.The text was updated successfully, but these errors were encountered: