requests.exceptions.JSONDecodeError:

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