Running into a problem when deploying application yet app works perfectly on local desktop

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:

Does anyone know how to solve it please? Thanks!!

The interpreter seems to disagree. In my experience, interpreters and compilers are way better than humans at this.

Hi Goyo,

Thanks for the reply but sarcasm is not really helping me solve this to be honest.

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.

Any help is appreciated please.

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 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.

1 Like

Can you provide more information about where you deployed it?

Hi Goyo,
Thanks for this.
When I use the 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.

1 Like

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.

Anyone can please provide some insights into this? Much appreciated as I cannot solve it. Thanks!

Hi all,
Does anyone know why The streamlit cloud is installing an older version (1.0.2) of this module?

Alos how can I fix it please?
My environment has the 1.3.2 module version installed and I think this is causing the error:

How can I fix it please? Thank you

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.

1 Like

Hi Franky thanks for the reply.
My requirement.txt contain these:

A screenshot is here:

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?

During the initial deployment under “Advanced Settings”

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.