New error for all existing streamlit apps

Hello,

I have multiple streamlit apps, that all have been working fine until today. I haven’t changed anything about the code since last running them. Today, when I tried running one of them as I usually do (streamlit run file.py) I got the following error message:

ImportError: cannot import name ‘ComponentRequestHandler’ from ‘streamlit.components.v1.components’ (C:\Anaconda3\lib\site-packages\streamlit\components\v1\components.py)

I tied with all my other streamlit apps and get the same error. I already tried updating streamlit but the error is still there.

Any ideas what might be causing this?

Thank you!

Which code is trying to import ComponentRequestHandler from streamlit.components.v1.components?

I don’t directly try to import this, which is why I’m a bit confused. This error message just suddenly shows up for all my (different) streamlit apps, which have been working fine until today. I haven’t changed the codes in the meantime.
The error message doesn’t seem to refer to a line in my own code:
Traceback (most recent call last):
File “C:\Anaconda3\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Anaconda3\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Anaconda3\Scripts\streamlit.exe_main
.py", line 4, in
File “C:\Anaconda3\lib\site-packages\streamlit\cli.py”, line 27, in
import streamlit.bootstrap as bootstrap
File “C:\Anaconda3\lib\site-packages\streamlit\bootstrap.py”, line 36, in
from streamlit.server.server import Server, server_address_is_unix_socket
File “C:\Anaconda3\lib\site-packages\streamlit\server\server.py”, line 65, in
from streamlit.components.v1.components import ComponentRequestHandler
ImportError: cannot import name ‘ComponentRequestHandler’ from ‘streamlit.components.v1.components’ (C:\Anaconda3\lib\site-packages\streamlit\components\v1\components.py)

Which version of Streamlit is that? There is no lib\site-packages\streamlit\server\server.py in Streamlit 1.14.0. The las release with that file was 1.11.1, but that version does have a class ComponentRequestHandler in streamlit.components.v1.components. You might have a corrupted installation.

Unless the version of the Streamlit library is pinned in your dependency file, the system will install the latest version of the library when performing updates to the underlying infrastructure. Updates to the underlying infrastructure will happen on a regular basis (like was the case here).

To address the issue you should either update your application to use the latest Streamlit version or you should pin the version of the Streamlit library.

Just checked my version of Streamlit - it is indeed 1.11.1.
I updated it again just now and the version is still 1.11.1. Can you think of a reason why the most recent version I can have is 1.11.1?

My app was working jut fine two minutes ago, suddenly I am getting this error. The page doesn’t even load. Is anyone experiencing the same thing?
image

This is what I get when trying to update streamlit:

The following packages will be SUPERSEDED by a higher-priority channel:

streamlit conda-forge/noarch::streamlit-1.14.0-~ → pkgs/main/win-64::streamlit-1.11.0-py39haa95532_0 None

@KR23 Can you try making conda-forge a higher-priority channel by running this command, and then retrying your installation?

conda config --prepend channels conda-forge