Your issue
I wanted to create a database in Qovery. I grabbed the db_url from the UI.
DB_URL = "postgresql://postgres:_Ij=de-6S8B$avgXtFN?@U-+0gnAZ0x!@z3baa5944-postgresql.qovery.io:5432/postgres"
(Don’t worry, this database does not exist in Qovery anymore.)
I’m getting an error.
File "/home/harshitsinghai/.pyenv/versions/3.9.5/lib/python3.9/urllib/parse.py", line 178, in port
raise ValueError(message) from None
ValueError: Port could not be cast to integer value as '_Ij=de-6S8B$avgXtFN'
I deleted the database, created a new one, and tried again with the new db_url, But I’m getting the same error.
I think the db_password should be encoded.
It was working fine when I was using Heroku. I was directly using Heroku Postgres URL, but shifting database from Heroku to Qovery lead to this error.
Thanks for sharing this, I experienced the same problem with Ruby unable to parse the url, since the passwords have special characters in it, so some languages can’t parse it correctly.
Escaping the string did indeed work, but I had to recreate the DATABASE_URL manually instead of using the one provided by Qovery.
Be aware though, like Rachit mentioned, that your DB is still accessible