Again "Spreadsheet must be specified"

Hi Community,

I recently posted my problem here:

The solution seemed to work, but unfortunately only briefly before the problem appeared again. Since nothing in the dependencies or the secrets.toml file has changed I assume it must be connected to the gsheets package.
Since the app still works fine when I run it locally I have absolutely no idea what the exact issue might be.
Every help is appreciated.

Kind regards,
Nicholas

Could you tell us your requirements.txt?

Sure :slight_smile:

pandas == 1.5.3
plotly == 5.9
datetime
streamlit_option_menu == 0.3.6
st-gsheets-connection == 0.0.3

Already worked for a few days with these requirements.


why no gsheets available database connection? Spreadsheet must be specified error. hard no solve. anyone to help this error? thanks

1 Like

I’ve just discovered what was the problem in my case, since I was receiving the same message only for the deployed app, while locally app worked fine.
I didn’t have set secrets on Settings->Secrets tab. When I pasted secrets.toml content here, It worked.

I am experiencing a similar issue. My application functions correctly, and I am able to input data accurately, which is reflected in Google Sheets. However, upon deploying to GitHub with the .streamlit folder and the secrets.toml file, I encounter the error message: GSheets Connection - “Spreadsheet must be specified.” Mr. Jose suggested a solution, stating, “set secrets on Settings->Secrets tab. When I pasted the contents of secrets.toml here,” but I find this unclear. Could you please provide screenshots demonstrating how he resolved this issue?

this code add in secrets.toml file like your sample below
db_username = “Jane”
db_password = “mypassword”

please guide me which code add in toml file that link with advance setting at deployment time