I have issue saying that the source file (Csv) used in the python script is not found (i guess it is stored in my local) when i run it on a web browser. My goal is to create an app that i can share the URL to other users.
Not sure if i have to store the file in Github repository or anywhere else. Its size is quire large 212 MB.
Help is a lot appreciated!
Here is the error:
ParserError: An error occurred while calling the read_csv method registered to the pandas backend. Original Message: Error tokenizing data. C error: Expected 1 fields in line 4, saw 3
Traceback:
File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script
exec(code, module.__dict__)File "/workspaces/Streamlit_App/Financial_Stock_Analysis__Tokyo_Stock_Exchange_.py", line 12, in <module>
df = dd.read_csv('https://1drv.ms/u/s!Av5FrLYnIe5Rgn7VixCVO4h1NRQp?e=ekeolE')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/vscode/.local/lib/python3.11/site-packages/dask/backends.py", line 138, in wrapper
raise type(e)(
thanks for the reply. I’ve tried storing csv file in Google Drive but the format is distort dramatically which ended up into a HTML one.
Due to a large volume of file 208 MB, I uploaded it as Large file storage to Github repository, and run it in Streamlit. The problem is sometimes it works, sometimes a few errors incurrs and not the whole script is run smoothly on the app (only the first few parts… and it keeps running/connecting…). Not sure what to do to fix it ;/
I tried to set up connection between Streamlit and google cloud storage (where my source file is stored in a bucket) got the secrets as json file dowloaded in local folder. However, i have no clue how to get the authentication info work via python script without exposing the secret value to the public because there is no point storing it in local. I tried various ways such as set up secret environment variable in Streamlit Cloud Dashboard but failed… no idea where to store this string of secret values where i can access it easily.
Hope you get the point!? Sorry for lengthy description if i don’t understand the issue to its nature.