GPT-auto-webscraping icon indicating copy to clipboard operation
GPT-auto-webscraping copied to clipboard

File not found error

Open DoLife opened this issue 1 year ago • 3 comments

Hi

Thank you for the code. It seems a file is missing that is needed.

FileNotFoundError: No secrets files found. Valid paths for a secrets.toml file are: C:\Users**.streamlit\secrets.toml

Where can I find this file or how can I create it and what exactly should be in the file?

Thank you

DoLife avatar Jan 07 '24 06:01 DoLife

Hi! have you already created the config.ini file? if not, create it on the proyect root folder, you can test if the proyect starts by filling with the follwing content [DEFAULT] API-KEY = {fill the value with your OPENAI API Key}

Please let me know if it's not the case.

TTomas78 avatar Jan 07 '24 13:01 TTomas78

Hi! have you already created the config.ini file? if not, create it on the proyect root folder, you can test if the proyect starts by filling with the follwing content [DEFAULT] API-KEY = {fill the value with your OPENAI API Key}

Please let me know if it's not the case.

It was created with the relevant key. It us asking for a file called secrets.toml I created that file in the directory where it is looking for the file as follows: ["LANGCHAIN_API_KEY"] value = "hf_***************"

But now Im`receiving the following error ": 2024-01-07 08:53:44.355 Uncaught app exception Traceback (most recent call last): File "C:\Users\Admin\anaconda3\envs\gptscraping\Lib\site-packages\streamlit\runtime\secrets.py", line 305, in getitem value = self._parse(True)[key] ~~~~~~~~~~~~~~~~~^^^^^ KeyError: 'LANGCHAIN_PROJECT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Admin\anaconda3\envs\gptscraping\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script exec(code, module.dict) File "C:\GPT-auto-webscraping\app.py", line 21, in os.environ["LANGCHAIN_PROJECT"]=st.secrets["LANGCHAIN_PROJECT"] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\anaconda3\envs\gptscraping\Lib\site-packages\streamlit\runtime\secrets.py", line 311, in getitem raise KeyError(_missing_key_error_message(key)) KeyError: 'st.secrets has no key "LANGCHAIN_PROJECT". Did you forget to add it to secrets.toml or the app settings on Streamlit Cloud? More info: https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management'

Even when i launch the direct hugingface direct link it returns the same errors.

DoLife avatar Jan 07 '24 17:01 DoLife

hi @DoLife This error is due our fault, we have an space in huggingface that consume some keys from streamlit secrets

You can delete these lines in the app.py to avoid using that variables, that are to track some information about the use of the space in hf

https://github.com/DataPrismAI/GPT-auto-webscraping/blob/596bda610c0d9ea24d011ac0cd4eef00dafe494d/app.py#L13-L16

GianfrancoCorrea avatar Feb 06 '24 16:02 GianfrancoCorrea