【问题标题】:Streamlit app keep showing "Please wait..." and give error in terminalStreamlit app keep showing \"Please wait...\" and give error in terminal
【发布时间】:2022-11-20 20:33:08
【问题描述】:

The following error occurred in the terminal in Pycharm by running streamlit run app.py

2022-08-19 20:50:02.531 Uncaught exception
Traceback (most recent call last):
  File "e:\project\movies-recommender-system\venv\lib\site-packages\tornado\http1connection.py", line 276, in _read_message
    delegate.finish()
  File "e:\project\movies-recommender-system\venv\lib\site-packages\tornado\routing.py", line 268, in finish
    self.delegate.finish()
  File "e:\project\movies-recommender-system\venv\lib\site-packages\tornado\web.py", line 2322, in finish
    self.execute()
  File "e:\project\movies-recommender-system\venv\lib\site-packages\tornado\web.py", line 2344, in execute
    self.handler = self.handler_class(
  File "e:\project\movies-recommender-system\venv\lib\site-packages\tornado\websocket.py", line 224, in __init__
    super().__init__(application, request, **kwargs)
  File "e:\project\movies-recommender-system\venv\lib\site-packages\tornado\web.py", line 215, in __init__
    super().__init__()
  File "C:\Python39\lib\typing.py", line 1083, in _no_init
    raise TypeError('Protocols cannot be instantiated`enter code here`')
TypeError: Protocols cannot be instantiated

【问题讨论】:

  • Create another empty try.py file and write st.write("Try") and the run that file streamlit run try.py and if that work, then you will have to provide the code in your app.py and explane in your question what you did in terminal before running app.py.

标签: python web-applications streamlit


【解决方案1】:

I had the same issue. Uninstall streamlit and install the version 1.11.0

Type into the terminal:

pip uninstall streamlit

pip install streamlit==1.11.0

【讨论】:

    【解决方案2】:

    This problem shows up because of the streaming version. You can uninstall and reinstall the previous version. Try this command:

    pip uninstall streamlit
    pip install streamlit==1.11.0

    【讨论】:

      猜你喜欢
      • 2022-12-01
      • 2021-07-02
      • 2017-03-23
      • 2015-11-20
      • 2022-12-27
      • 2022-12-01
      • 1970-01-01
      • 2022-12-26
      • 2022-12-02
      相关资源
      最近更新 更多