I'm relatively new to python and postgresql. I have inherited some code (python) that built a postgresql database using psycopg2 and sqlalchemy.
The database is named 'tetradev'
with user 'tetra'
On top of this is a browser based application running via flask that queries the database to load information on a map.
I recently changed the password for the user 'tetra'
and now I get a
"Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application"
on the URL.
Through the server where this is all hosted I get a
"OperationalError: (psycopg2.OperationalError) FATAL: password authentication failed for user " error.
However, via the terminal, I have no issues connecting to 'tetradev'
via user 'tetra'
directly.
Any ideas on how to fix this?
Edit
Below are the settings in the config file.
db_NAME = os.getenv(‘db_NAME', ‘tetradev')
db_USER = os.getenv(‘db_USER', ’tetra’)
db_PASSWD = os.getenv(‘db_PASSWD', 'default')
db_HOST = os.getenv(‘db_HOST', ‘xxx.xx.xxx.xx’)
db_PORT = os.getenv(‘db_PORT', 5432)