2025-01-30 08:50:23.761 Uncaught app execution
Traceback (most recent call last):
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
exec(code, module.__dict__)
File "/Users/darren/Projects/streamlit/app.py", line 22, in <module>
conn = st.connection(
^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/connection_factory.py", line 415, in connection_factory
conn = _create_connection(
^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/metrics_util.py", line 409, in wrapped_func
result = non_optional_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/connection_factory.py", line 103, in _create_connection
return __create_connection(name, connection_class, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 218, in __call__
return self._get_or_create_cached_value(args, kwargs, spinner_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 260, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 318, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/runtime/connection_factory.py", line 81, in __create_connection
return connection_class(connection_name=name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darren/Library/Caches/pex/venvs/0e7f7ef52d296012b4e4e08c8db05955cc00c4e1/575ca5ce34ac5d283b0502f9efc6408236868ea9/lib/python3.11/site-packages/streamlit/connections/base_connection.py", line 73, in __init__
self._raw_instance: RawConnectionT | None = self._connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: GSheetsConnection._connect() got an unexpected keyword argument 'project_id'
I'm getting a
TypeError: GSheetsConnection._connect() got an unexpected keyword argument 'project_id'when attempting to load my service account's credentials programmatically (the JSON is stored in GCP Secrets Manager).The docs for st.connection mention the secrets can be provided as additional keyword args:
However that doesn't seem to be working.
I suspect that
GSheetsConnection._connect(..)needs to be updated to something like this (untested):app.py
.streamlit/secrets.toml
Stack trace