Secrets.toml not Found

Secrets file not found. Expected at: C:\Users\enes_\Desktop\Projects\Commi Atılacak\Garbage-Management-at-Istanbul.streamlit\secrets.toml

FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\enes_\Desktop\Projects\Commi Atılacak\Garbage-Management-at-Istanbul\.streamlit\secrets.toml’

I tried to add secrets.toml to the main file that I’m working and I created a streamlit file and added the tml file inside it but both of them didn’t work.

I’m trying to add a comment section to my app using this repo.

Can anyone help me who used this kinda thing before?

Did you make sure to name your folder .streamlit with a dot at the beginning, and then put the secrets.toml file inside of that folder?

The file structure should then be:

  • .streamlit/
    • secrets.toml
1 Like

def connect():
# Create a connection object.
credentials = service_account.Credentials.from_service_account_info(
at repo there is a file in there there is a few code lines like that. Do anyone knows what should I text for gcp_service_account

It should look something like this (in toml format)


type = "service_account"
project_id = "PROJECT_ID"
private_key_id = "KEY_ID"
private_key = "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY\n-----END PRIVATE KEY-----"
client_email = "SERVICE_ACCOUNT_EMAIL"
client_id = "CLIENT_ID"
auth_uri = ""
token_uri = ""
auth_provider_x509_cert_url = ""
client_x509_cert_url = ""

You can see more info about creating and using those credentials here Create and manage service account keys  |  IAM Documentation  |  Google Cloud

I did a .toml file like you sent and read value from that.

But I got the following error from that:

SAMPLE_RANGE_NAME = ‘StreamlitGarbage!A1:C1’

def collect(gsheet_connector) → pd.DataFrame:
values = (

df = pd.DataFrame(values["values"])
df.columns = df.iloc[0]
df = df[1:]
return df

Do you have a worksheet titled StreamltiGarbage in that google sheet? If you only have one worksheet, you could just use A1:C1, with the worksheet name.

For what it’s worth, I find to be a much more pleasant usage experience rather than using the official Google Google Sheets API directly.

Thanks for your answers. They were great !

1 Like