Hello,
I’ve just got this Error while loading my app to streamlit cloud. The same code worked perfectly so far, that’s why I have no idea what to do now?
Hello,
I’ve just got this Error while loading my app to streamlit cloud. The same code worked perfectly so far, that’s why I have no idea what to do now?
Hi @Mike7205
Could you provide more context or details about the error message? This will help us provide a more accurate response!
Thanks,
Charly
When you say the same code worked perfectly so far, is that in a version running locally or a deployed streamlit cloud version?
If it’s the former, it may be the case that in the cloud version, wherever you’re trying to connect to blocks traffic to prevent web scraping. Try get the status_code from the response before you attempt to return a json object, that should help inform what’s going on.
See Error - requests.exceptions.JSONDecodeError - #2 by randyzwitch
Hey @Mike7205 ,
Just a tip of advice here. Web scraping works a bit funny and isn’t always reliable when hosting it on the streamlit cloud. I’d suggest you create a fastapi wrapper for your scraper and query to it instead of the scraper itself. This way, you should have more reliable code that doesn’t break. You’ll also be able to handle the errors gracefully.
Hope this helps!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
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.
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.
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.
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.