a year ago
I am deploying a streamlit app
It seems to crash after attempting to deploy for 5 minutes . The logs say the following /opt/venv/bin/python: No module named momentum_dashboard, however in my GitHub repo it is located src/momentum_dashboard.
Thoughts on how I can correct this?
1 Replies
a year ago
Hey there Tom,
The error you're encountering is likely due to Python not being able to find the momentum_dashboard module because it's located in a subdirectory (src). To resolve this, you can adjust your PYTHONPATH to include the src directory. Here's how you can do it:
Modify the
PYTHONPATH: You can set thePYTHONPATHenvironment variable to include thesrcdirectory. This can be done in your deployment settings or by adding a.envfile with the following content:
PYTHONPATH=srcUpdate your
requirements.txt: Ensure that all dependencies are listed in yourrequirements.txtfile and that it's included in your project root. We find that a lot of errors from users come from a malformed requirement.txt
Let me know if this works,
Angelo
Status changed to Awaiting User Response Railway • about 1 year ago
6 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 6 months ago