If you’re creating a debugging post, please include the following info:
- Are you running your app locally or is it deployed?
Locally it works, on the cloud it fails with the error shown below
-
If your app is deployed:
a. Is it deployed on Community Cloud or another hosting platform?
On the Community Cloud
b. Share the link to the public deployed app.
https://testingappcapacityone.streamlit.app/
-
Share the link to your app’s public GitHub repository (including a requirements file).
- Share the full text of the error message (not a screenshot).
ValueError: Spreadsheet must be specified
Traceback:
File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.__dict__)File "/workspaces/Test-App-Streamlit/Streamlit_app.py", line 8, in <module>
df = conn.read(index_col=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/vscode/.local/lib/python3.11/site-packages/streamlit_gsheets/gsheets_connection.py", line 570, in read
return self.client.read(
^^^^^^^^^^^^^^^^^File "/home/vscode/.local/lib/python3.11/site-packages/streamlit_gsheets/gsheets_connection.py", line 419, in read
raise ValueError("Spreadsheet must be specified")
- Share the Streamlit and Python versions.
import streamlit as st
import pandas as pd
from streamlit_gsheets import GSheetsConnection
Create a connection object.
conn = st.connection(“gsheets”, type=GSheetsConnection)
df = conn.read(index_col=False)
st.write(st.secrets[‘connections’])
print(“Hello World”)