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

Update postgres DATABASE_URL as per psycopg2 requirements. #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

g-paras
Copy link
Owner

@g-paras g-paras commented Aug 29, 2021

Postgres DATABASE_URL should start with postgresql:// but in Heroku database it starts with postres:// which can cause an Application error.

Fix
Instead to directly passing the environment variable, first load the variable and then replace postgres:// with postgresql:// using str.replace method.

@g-paras g-paras temporarily deployed to sentiment-analysis-web-app August 29, 2021 14:35 Inactive
replace method does not update the string instead, it creates a new string. We need assing that new string to database_url
@g-paras g-paras temporarily deployed to sentiment-analysis-web-app August 29, 2021 14:50 Inactive
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.

None yet

1 participant