davila7 / file-gpt

Start a chat with any document with Ada Embedding and Davinci Completion
MIT License
142 stars 34 forks source link

TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias' #3

Closed uhuhh closed 1 year ago

uhuhh commented 1 year ago

Error when open the link.

Python 3.9.14 Redhat EL 9.1

You can now view your Streamlit app in your browser.

Network URL: http://x.x.x.x:8501 External URL: http://x.x.x.x:8501

2023-02-22 22:18:53.256 st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs. 2023-02-22 22:18:53.260 st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs. 2023-02-22 22:18:53.261 st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs. 2023-02-22 22:18:53.262 st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs. 2023-02-22 22:18:53.263 Uncaught app exception Traceback (most recent call last): File "/home/chatgpt/.local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/home/chatgpt/file-gpt/app.py", line 4, in from utils import ( File "/home/chatgpt/file-gpt/utils.py", line 162, in

def wrap_text_in_html(text: str | List[str]) -> str:

TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

Captura2 Captura

alealima commented 1 year ago

The issue will be resolved if you upgrade to python 3.10+