Hi community,
I am running into this problem when running the app even though it runs perfectly ok in my desktop. The error says is related to start_date input yet that is a parameter in the argument of the function so not sure whats happening here:
The function clearly has start date as a parameter inside the function Toolkit argument. And as per the docs it also has it. Also I can run the stremalit perfectly from my local environment.
It is serious advice, not sarcasm. I have made the same mistake and wasted many hours because of it. I want to spare you that.
The docs and examples clearly say so, but the interpreter knows better. Documentation and examples can be wrong or can be written for a different version. Add st.help(Toolkit.__init__) right before creating the Toolkit instance to see the signature of the actual class you are importing.
That is good. Look for differences between your local and cloud environments, that is where the problem lies. Start by comparing the versions of financetoolkit since that is where Toolkit comes from.
Hi Goyo,
Thanks for this.
When I use the st.help(Toolkit.init) I cannot see the argument of start_date inside it which I think is causing the error.
I double checked and the version of modules in my local environment and the ones in “manage app” are the same.
Specifically the financetoolkit==1.3.2 on both my local environment and specified in the requirements.txt. So how can it be I get a working function that accepts start_date in my local environment but once in streamlit cloud the class Toolkit does not accept start_date? I really don’t understand that.
Thanks for any explanation
Specified and actually installed are not the same thing. Sometimes pip cannot met all the requirements and installs different versions. If you make changes to requirement.txt you may need to reboot or even redeploy the application so that the changes are properly applied. Keep an eye on the logs to see what packages are being installed.
Hi Goyo yes . Did reboot the application and checked the log inside manage app to ensure the same version module gets pip installed.
I really dont get why Toolkit has a different set of arguments in cloud (does Not accept start_date) vs my local environment (accepts start_date) using the same version. Never came across this do you know why can this be the case?
Would be great to understand how can this can happen and also solve it.
The latest version of financetoolkit requires at least python version >=3.10 but i assume from your first post that you selected python version 3.9 in streamlit cloud.
After trying this quickly in a docker container, i can confirm that 1.0.2 is the latest version in python 3.9 and 1.3.2 ist the latest version in python 3.10 that could be installed.
Besides, please share your public github repo or at least show us your requirements.txt file.
Hi Franky thanks for the reply.
My requirement.txt contain these:
streamlit
fundamentalanalysis<0.3.0
pandas
numpy
matplotlib
financetoolkit
plotly.express
datetime
I cannot share the link because it has company data which is sensitive.
Please can you specify how can I run python 3.10 in the streamlit cloud so that I can get the correct financetoolkit version and solve this problem?