Hello everyone, everything good? The code is working, but I don’t understand why it is giving the following error. Before deploying I want to resolve this error.
2023-03-23 21:52:00.488 Failed to load secrets.toml file
Traceback (most recent call last):
File "C:\Users\wagne\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\web\bootstrap.py", line 174, in _on_server_start
secrets.load_if_toml_exists()
File "C:\Users\wagne\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\secrets.py", line 128, in load_if_toml_exists
self._parse(print_exceptions=False)
File "C:\Users\wagne\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\secrets.py", line 182, in _parse
secrets = toml.loads(secrets_file_str)
File "C:\Users\wagne\AppData\Local\Programs\Python\Python310\lib\site-packages\toml\decoder.py", line 260, in loads
raise TomlDecodeError("Found invalid character in key name: '" +
toml.decoder.TomlDecodeError: Found invalid character in key name: ':'. Try quoting the key name. (line 6 column 7 char 181)
I’m turning a google spreadsheet into a dataframe, and after that I’m creating some charts with the data from the spreadsheet. For this I am using gspread as follows.
gc = gspread.oauth()
sh = gc.open("spreadsheet_name")
page = sh.worksheet('sheet1')
df = pd.DataFrame(page.get_all_records())
Could someone help me to resolve this error?