kevin-struckhoff opened a new issue #16096:
URL: https://github.com/apache/superset/issues/16096
I'm attempting to add my first Postgres database connection info using the
Superset 1.2 web UI. I select the Add Database screen and type in the name and
the connection string, then hit the test connection button
### Actual results
I received this error after hitting the 'test connection' button:
ERROR: Could not load database driver: PostgresEngineSpec
#### How to reproduce the bug
1. Go to Superset Admin web page and login.
2. Click on the Data menu and select Databases
3. Hit the '+ Databsase' button
4. enter in Name and postgresql string info:
postgresql://postgres:PoPassWord@dbserverIP:5432/dbname
5. See error
ERROR: Could not load database driver: PostgresEngineSpec
### Environment
(please complete the following information):
- superset version: `1.2`
- python version: `3.8`
- node.js version: not running node
- any feature flags active:
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included
it here as text if there are any.
-
- [ ] I have reproduced the issue with at least the latest released version
of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't
found one similar.
### Additional context
Within the file
/venv/lib/python3.8/site-packages/superset/db_engine_specs/postgres.py, there
is a class
definition called PostgresEngineSpec. Here are the 1st few lines of code:
class PostgresEngineSpec(PostgresBaseEngineSpec, BaseParametersMixin):
engine = "postgresql"
engine_aliases = {"postgres"}
drivername = "postgresql+psycopg2"
sqlalchemy_uri_placeholder = (
"postgresql+psycopg2://user:password@host:port/dbname[?key=value&key=value...]"
)
The file was originally dated around May 25, 2021 and contains 262 lines.
I replaced some code from the current postgres.py file but I got the same
error.
The code I copied from the latest postgres.py file (334 lines) here on
github was this:
default_driver = "psycopg2"
sqlalchemy_uri_placeholder = (
"postgresql://user:password@host:port/dbname[?key=value&key=value...]"
)
Hopefully this is any easy fix, I;m stuck w/o a database to use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]