Error parsing password from yoyo.ini

This appears to be a variant of #74.

For the following database connection string:


If I provide a password that includes symbols such as:


I receive the following error:

ValueError: invalid literal for int() with base 10: "pass+&~#/"

Sorry to keep bothering, and thank you for taking a look.

Assigned to
3 years ago
1 year, 11 days ago
No labels applied.

~olly 3 years ago

I think you need to URL escape the password, eg:


~jeredsutton_opstack 3 years ago

I think you are correct, however that will be difficult to do with the way the environment variables are being populated.

The issue seems to stem from the code assuming the 'database' URL is properly urlencoded (a valid assumption). If that is the case, can I turn this into a feature request to support a 'username' and/or 'password' option in the config file with those options passing through a urllib.parse.quote?

~espo1026 1 year, 11 days ago

I am having a similar issue. I am pulling an auto-generated secret from AWS Secrets Manager that has a ? in it - causing the same error as this ticket pretty much. Is there a workaround other than using a password without the special character? I thought I would be able to pass each parsed value myself - i.e. username: password: host: database: etc.

Register here or Log in to comment, or comment via email.