Comments (1)
To resolve the "Fernet key must be 32 url-safe base64-encoded bytes" error and successfully store secret key global variables on Railway deployment, you need to ensure that your secret key is properly padded to be 32 url-safe base64-encoded bytes. Here is how you can do it:
- Ensure your secret key is correctly padded using the
add_padding
function. - Use the padded secret key to create a Fernet instance.
Here is the relevant code snippet:
def add_padding(s):
# Calculate the number of padding characters needed
padding_needed = 4 - len(s) % 4
return s + "=" * padding_needed
def get_fernet(settings_service=Depends(get_settings_service)):
SECRET_KEY = settings_service.auth_settings.SECRET_KEY.get_secret_value()
# It's important that your secret key is 32 url-safe base64-encoded bytes
padded_secret_key = add_padding(SECRET_KEY)
fernet = Fernet(padded_secret_key)
return fernet
Make sure that your SECRET_KEY
is set correctly in your settings and that it is being padded before being used to create the Fernet instance. This should resolve the error and allow you to store secret key global variables on Railway deployment [1][2][3].
To verify the version of Langflow that is currently deployed on Railway, you can use the get_version_info
function from the src/backend/base/langflow/utils/version.py
file. This function retrieves the version information of the Langflow package:
def get_version_info():
try:
from langflow.version import __version__ # type: ignore
version = __version__
package = "Langflow"
except ImportError:
from importlib import metadata
version = metadata.version("langflow")
package = "Langflow"
return {"version": version, "package": package}
You can call this function to get the version and package information of the deployed Langflow instance [4][5].
To continue talking to Dosu, mention @dosu.
from langflow.
Related Issues (20)
- Question about HuggingFace deployment HOT 2
- Issue with saving data to Chroma DB HOT 4
- Chroma DB build Error HOT 3
- I'm having issues setting up langflow through docker-compose HOT 8
- In Home page the alignment for github button is not correct HOT 2
- Couldn't get the vector search option HOT 8
- Implement CI for checking PR titles use conventional-commit
- Images Not Displaying Correctly in langflow (1.0.5) Docker Container Behind Traefik Proxy HOT 3
- Create Data component does not save key/value inputs when flow saves HOT 3
- Input not passing data through (bug or syntax issue?) HOT 2
- 添加 store key 报错 HOT 1
- Questions about the apiRequest component HOT 1
- Incorrect Usage of Flow as Tool HOT 1
- AstraDB component creates collection in Astra, but doesn't upsert data to collection HOT 7
- AURORA STK 3.6.9 I. A HOT 7
- Can't connect to SQL Database Utility: Error building component SQLDatabase: can't load plugin: sqlalchemy.dialects:postgres HOT 4
- Docker Compose: PermissionError: [Errno 13] Permission denied: '/var/lib/langflow/secret_key' HOT 6
- How to implement components with custom UI elements? HOT 4
- Unable to use `from selenium import webdriver` in CustomComponent. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langflow.