Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secrets.toml file is missing and throws error #25

Open
kkacstudent opened this issue Mar 8, 2024 · 2 comments
Open

secrets.toml file is missing and throws error #25

kkacstudent opened this issue Mar 8, 2024 · 2 comments

Comments

@kkacstudent
Copy link

poetry update does not work

Unable to read the lock file (Invalid statement (at line 1445, column 1)).

====

pipenv run throws below error

2024-03-08 07:34:34.806 Uncaught app exception
Traceback (most recent call last):
File "/home/ubuntu/.local/share/virtualenvs/rag-demo-4DIJ41Uf/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
exec(code, module.dict)
File "/home/ubuntu/rag-demo/rag_demo/main.py", line 1, in
from analytics import track
File "/home/ubuntu/rag-demo/rag_demo/analytics.py", line 8, in
analytics.write_key = st.secrets["SEGMENT_WRITE_KEY"]
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/share/virtualenvs/rag-demo-4DIJ41Uf/lib/python3.11/site-packages/streamlit/runtime/secrets.py", line 305, in getitem
value = self._parse(True)[key]
^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/share/virtualenvs/rag-demo-4DIJ41Uf/lib/python3.11/site-packages/streamlit/runtime/secrets.py", line 214, in _parse
raise FileNotFoundError(err_msg)
FileNotFoundError: No secrets files found. Valid paths for a secrets.toml file are: /home/ubuntu/.streamlit/secrets.toml, /home/ubuntu/rag-demo/.streamlit/secrets.toml

@jalakoo
Copy link
Contributor

jalakoo commented Mar 8, 2024

Thanks for raising @kkacstudent.

Fixes added to the update_dependencies branch:

  • pipenv dependencies updated
  • analytics now optional
  • secrets.toml.example key for the SEGMENT_WRITE_KEY corrected
  • Instructions added in README.md regarding needing to copy the secrets.toml.example as secrets.toml for Streamlit to run

This branch will be merged with main after we've finished review and testing.

@kkacstudent
Copy link
Author

Not able to find the branch update_dependencies shared above. Also related to the README could not find the file secrets.toml.example. Sorry if I missed anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants