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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.