Version 1.12.0

Thanks - in future I’ll check the repo for known issues :slight_smile:

1 Like

After update to 1.12, start old project, get an error like this:

File "C:\Python38\Scripts\streamlit.exe\", line 4, in <module>
ModuleNotFoundError: No moudle named "streamlit.cli"

back to 1.11.1, this error disappear.

from streamlit.scriptrunner import add_script_run_ctx

scriptrunner and add_script_run_ctx not found after updating to latest version.

Could you please let me know if there are any changes made to the names?

@Shawn_Pereira Hmm ok that is indeed a bug. I’m on vacation right now, so can’t look into it for the next 2 weeks. Could you open an issue on Github and copy your text/screenshots in there? Then we have it tracked and the engineers can look into it. Fyi @mayabarnes for visibility.


Hi @snehankekre,

I upgraded Streamlit from 1.11.0 to 1.12.0 on my office server. When I tried to run Streamlit, I got the following error:

Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python39\Scripts\streamlit.exe\", line 4, in <module>
ModuleNotFoundError: No module named 'streamlit.cli'

As per online help, I even tried ‘pip install networkx’ but nothing worked. I am in a fix as all the streamlit applications are down due to this.

Can you suggest a way to solve this?

Thanks in advance,

Hi @Shawn_Pereira

I’m afraid I don’t have a solution for it just yet. Did you try killing and restarting the apps after the update? Do you also run into the error when using the python -m streamlit run format?

Note: streamlit.cli has moved to streamlit.web.cli

Thanks @snehankekre for the quick response.

Yes, I tried all that you mentioned; rebooted the machine too. Didn’t work. Uninstalled Streamlit and found that it could still invoke version 0.87.

Promptly installed version 1.11 thereafter and everything was fine. I think I’ll skip 1.12 and move to the next version whenever it becomes available. 1.12 has me spooked.

Thanks once again for your suggestions and support.


same here in local i can run my app :
TypeError: Protocols cannot be instantiated

and on cloud same bug for sidebar resizing

With 1.11 its work

I get this same message.
Downgrades to 1.11.1 and all is OK…

Hopefully this is fixed in the next release.

@Egos @LukeF That’s a known issue caused by Python 3.9.7. Upgrading your Python version (e.g. to 3.9.12) will fix it. See here: Uncaught exception: TypeError: Protocols cannot be instantiated · Issue #5140 · streamlit/streamlit · GitHub


Ah fascinating. Thank you!

Amazing, thank you :slight_smile: :+1: Confirmed as failing on Python 3.9.7 but working with 3.10.6

Thanks for the information
but i dont understand why streamlit cloud dont use the last version of python
because the problem occurs on streamlit cloud too

i upgrade python to 3.9.12 and this not solve the problem
i go back to streamlit 1.11 and the problem disapear :disappointed_relieved:

You can’t change the python version for your application in Streamlit Cloud. You need to delete the application and create it again. When creating the application you can choose between several python versions.

@jrieke do you have example snippet of what is meant by " unctions cached with st.experimental_memo or st.experimental_singleton can now contain static st commands. This allows caching text, charts, dataframes, and more!" couldnt see any in docs if were there

1 Like

Hi @ksdaftari :wave:, you can now find examples of replaying static st commands in the docs for memo and singleton.


@snehankekre awesome thanks! took look at that clears things up very nicely. awesome functionality!

I would like to get a better understanding of the st.experimental_memo upgrade. I decorate a lot of functions with this; some returning dataframes, some returning charts.

For example, I have a function like this:

def retrieve_dataframe():
    return (dataframe file from AWS S3)

It accepts no arguments, retrieves the file once upon application load, and I assume this is the optimal way I can load / run this functionality. (1) Is that correct?

I have other functions using exp_memo like this:

def parse_info(df: pd.DataFrame) -> str:
    return ",".join(df.index.values)

Assuming the dataframe being passed to parse_info doesn’t change, (2) is the result of this function also cached?

I guess I’m unclear as to how v1.12 has improved the experimental_memo functionality. Can someone provide an explicit example and clarify how “this allows caching text, charts, dataframes, and more!”?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.