the code is more or less a copy paste of sample code given at link page_link
The way to run code will be streamlit run streamlit_app.py NOTE: The checked in version of the code works
Now if you go to file: pages/page2.py and uncomment line # import pandas as pd and run again the code crashes on running when you click on ‘backtesting page’ on the side bar
If you’re creating a debugging post, please include the following info:
Are you running your app locally or is it deployed? → locally
If your app is deployed:
a. Is it deployed on Community Cloud or another hosting platform? → N/A
b. Share the link to the public deployed app. → /NA
In case it helps here’s what I ended up doing to be sure my conda ENV is always correct, when I run it from my menu launcher app, because there can be issues with the envorinment depending on how you run it, but I decided for me this was the best way. If you just run the normal conda activate command it’s not guaranteed to always work.
conda_path="/home/clay/miniconda3"
export PATH="$conda_path/bin:$PATH"
source $conda_path/bin/activate quanta_agent
if [[ "$CONDA_DEFAULT_ENV" == "quanta_agent" ]]; then
python3 quanta-agent.py
else
echo "Failed to set Conda Environment: Expected quanta_agent but found $CONDA_DEFAULT_ENV"
sleep 10s
exit 1
fi
ok, I will try to google if there is a fix…
calling import pandas in main script, causes app to crash immediately (login screen does not even run)
i wonder if there is a compatibility issue between pandas 2.2.0 and streamlit 1.35.0 (though at this stage I am not calling any pandas method)
You could also try a test where you just run only that pandas import to see if that even works. Start with simplest possible scenario, and if it works then start adding stuff back a little at a time, to see when it stops working and that will tell you where the problem is. Also try writing to some log files and see how far along your log output can get before it stops.
That is a huge improvement. Unfortunately I cannot really reproduce it. I guess it is specific to the arm architecture or your python.
Since the problem persists after uninstalling streamlit, the culprit may be some of the dependencies installed along with it. I would expect pandas to work again if you uninstall all of them. If that is the case, some trial and error would tell you what package is causing the issue.
Also, if you are using the system python, you can try a different one from python.org.
Based on the hints & suggestions above, I seem to have a solution that works for me. Instead of creating conda environment I have created a pip environment i.e.
Though I do not like this workflow (only cause I am used to conda), it seems to do the trick. @toymodel333 let me know if this works for you too (or did I get plain lucky).
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.