Hello Everyone,
I have created an app publised on cloud.
I add at the end a landing page, which is collecting typical name, email and suggest and I want them be stored on private folder.
I supposed to see that csv with info in github but no.
Could anyone bring up thee light to my mind?
Thank you
The file is saved in the system where the application is running. You can make it available by using a download button or serving it through http.
Thanks for response
I would like to keep the csv on my βprivateβ folder , for instance in git hub where my repository is.
Could I do something similar ?
Thank
You should be able to track the csv file in github by using git. But I think any other file hosting service would do better for this kind of data. Like google drive. Maybe even better, use a cloud database.
Could you please give and advice of the code can I use for this case or where can I look up ?
Thank you
I have not done this for ages, but these links can help you with google drive.
Or using a spreadsheet instead of csv:
Thanks a lot
I am following the https://www.youtube.com/watch?v=_G5f7og_Dpo which is awesome, but I got an error on here:
oduleNotFoundError: No module named 'streamlit_gsheets'
2025-03-24 20:06:38.226 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
[20:06:41] π¦ Processing dependencies...
requirements.txt
streamlit==1.31.1
pandas==2.2.0
numpy==1.26.3
sentence-transformers==2.5.1
plotly==5.18.0
nltk==3.8.1
sqlalchemy==2.0.27
psycopg2-binary==2.9.9
beautifulsoup4==4.12.3
requests==2.31.0
python-dotenv==1.0.1
streamlit-option-menu==0.3.12
torch
torchvision
torchaudio
statsmodels
google-auth==2.27.0
google-auth-oauthlib==1.2.0
google-auth-httplib2==0.1.1
google-api-python-client==2.112.0
st-gsheets-connection
Do not know where the issue comes from
Thank you
It comes from st-gsheets-connection
not being installed. There must be an explanation in the logs.
Using uv pip install.
Using Python 3.12.9 environment at /home/adminuser/venv
Γ No solution found when resolving dependencies:
β°ββΆ Because only the following versions of st-gsheets-connection are
available:
st-gsheets-connection==0.0.3
st-gsheets-connection==0.0.4
st-gsheets-connection==0.1.0
and st-gsheets-connection<=0.0.4 depends on pandas>=1.3.0,<2, we can
conclude that st-gsheets-connection<0.1.0 depends on pandas>=1.3.0,<2.
And because st-gsheets-connection==0.1.0 depends on streamlit>=1.32.0
and you require streamlit==1.31.1, we can conclude that your
requirements, all of:
pandas<1.3.0
pandas>=2
, all versions of st-gsheets-connection are incompatible.
And because you require pandas==2.2.0 and st-gsheets-connection, we can
conclude that your requirements are unsatisfiable.
You should be able to fix it by using a more recent streamlit.
Thanks a lot
Now is throwing me an error on the connection
βββββββββββββββββββββ Traceback (most recent call last) βββββββββββββββββββββββ
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru
nner/exec_code.py:121 in exec_func_with_error_handling
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru
nner/script_runner.py:593 in code_to_exec
/mount/src/spanish_wine/spanish-wine-analytics/src/app.py:1196 in <module>
1193 β conn = st.connection("gsheets", type=GSheetsConnection)
1194 β
1195 β # Fetch existing vendors data
β± 1196 β existing_data = conn.read(worksheet="feedback", usecols=list(rang
1197 β existing_data = existing_data.dropna(how="all")
1198 β
1199 β st.dataframe(existing_data)
gspread.exceptions.APIError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if youβre on Streamlit Cloud, click on βManage appβ in the lower right of your app).
Traceback:
File β/mount/src/spanish_wine/spanish-wine-analytics/src/app.pyβ, line 1196, in
existing_data = conn.read(worksheet=βfeedbackβ, usecols=list(range(6)), ttl=5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit_gsheets/gsheets_connection.pyβ, line 520, in read
return self.client.read(
^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit_gsheets/gsheets_connection.pyβ, line 200, in read
return _get_as_dataframe(
^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.pyβ, line 217, in call
return self._get_or_create_cached_value(args, kwargs, spinner_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.pyβ, line 259, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.pyβ, line 317, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit_gsheets/gsheets_connection.pyβ, line 195, in _get_as_dataframe
worksheet=self._select_worksheet(spreadsheet=spreadsheet, folder_id=folder_id, worksheet=worksheet),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit_gsheets/gsheets_connection.pyβ, line 165, in _select_worksheet
spreadsheet = self._open_spreadsheet(spreadsheet=spreadsheet, folder_id=folder_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/streamlit_gsheets/gsheets_connection.pyβ, line 147, in _open_spreadsheet
return self._client.open(title=spreadsheet, folder_id=folder_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/gspread/client.pyβ, line 183, in open
spreadsheet_files, response = self._list_spreadsheet_files(title, folder_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/gspread/client.pyβ, line 156, in _list_spreadsheet_files
response = self.request(βgetβ, url, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/home/adminuser/venv/lib/python3.12/site-packages/gspread/client.pyβ, line 93, in request
raise APIError(response)
As I said, I havenβt done this in a long time, so I cannot sort the details out for you, unfortunately. That said, the full error details that have been recorded in the logs might shed some light.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.