-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Unable to Use '%' Sign in Database Password #1528
Comments
Hey there, @Trinkes! Great to see you around here again. Hope you're doing well. Thank you for bringing this issue to our attention. It seems like you're encountering a problem with using a '%' sign in your database password due to Alembic's handling of '%' signs in the To use a '%' sign in your database password for Langflow, you can follow these steps:
Here's how you can do it in Python: from urllib.parse import quote_plus
# Original password
password = "your_password_with_%_sign"
# Encode the password
encoded_password = quote_plus(password)
# Alembic requires '%%' to escape '%'
alembic_safe_password = encoded_password.replace('%', '%%')
# Now, use `alembic_safe_password` in your SQLAlchemy URL in the alembic.ini file After encoding and escaping the password, you should manually insert it into the sqlalchemy.url = postgresql:https://user:%%25EncodedPasswordHere@localhost/langflow Replace Please note that the database password in the langflow codebase is handled through the I hope this helps! If you have any further questions or issues, please don't hesitate to ask. Sources
|
Isn't there a better way to do this other that editing the actual project's code? |
Hey @Trinkes I think I like the idea of having different variables for both as an optional override. |
Describe the bug
I've encountered an issue where I'm unable to use the '%' sign in my database password. This problem has been discussed in the Alembic repository (Issue #700), where it's noted that Alembic doesn't allow '%' signs in the password.
To work around this limitation, it's suggested to use urllib.parse.quote_plus to encode the password and replace the '%' with '%%' as described in this comment. However, this workaround results in an incorrect password in the SQLAlchemy context.
Steps to reproduce:
Expected behavior:
The database password containing the '%' sign should be accepted and function properly in both Alembic and SQLAlchemy contexts.
Actual behavior:
Alembic does not allow the '%' sign in the password, and the suggested workaround results in an incorrect password in SQLAlchemy.
Browser and Version
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
trying to setup and use langfuse using docker.
The text was updated successfully, but these errors were encountered: