My app was working well, but I did a reboot because it was not taking the most recent changes done in the repository.
After the reboot it is giving an error with the following trace back:
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)File "/app/virtualassistant/chatbot.py", line 19, in <module>
from streamlit.secrets import SecretManager
Goyo, thanks for your reply.
Checking the docs, I found that the lines #from streamlit.secrets import SecretManager, and #openai.api_key = SecretManager.get(‘OPENAI_API_KEY’) are NOT documented. I changed them to #st.secrets… as documented, and the app returned to life!!! Thanks for that, but now I have another question: Where could I have found those lines I was using (where there in the docs before?), and moreover why they were working well until the reboot of the app? If you have an idea please let me know. It would be nice to understand it.
I have no idea. I don’t remember ever seeing anything like that.
Apparently you added that code on May 30th, along with a long comment that I don’t quite understand. It is weird that you don’t remember why you wrote that code and comment five days ago. I am quite sure there were no references to a streamlit.secrets.SecretsManager in the docs at that time.
If you deployed about that date for the first time the installed Streamlit version should have been 1.22.0 (released Apr 27th), which doesn’t have a streamlit.secrets.SecretsManager either, so I don’t know how that could have ever worked.
Hi. Thanks again for taking your time to check it. I’m really new to this, so I grabbed info from many different places, that’s why I don’t remember where I read about that secretmanager. the weird thing is that it worked perfectly until the reboot of the app. Anyway, thanks again, I’ll keep learning.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.