Version 0.65.0

Version 0.65.0

Highlights:

  • :gear: Ability to set page title, favicon, sidebar state, and wide mode via st.beta_set_page_config(). See our documentation for details.
  • :memo: Add stateful behaviors through the use of query parameters with st.experimental_set_query_params and st.experimental_get_query_params. Thanks @zhaoooyue!
  • :panda_face: Improved pandas dataframe support for st.radio, st.selectbox, and st.multiselect.
  • :stop_sign: Break out of your Streamlit app with st.stop.
  • :framed_picture: Inline SVG support for st.image.

Callouts:

  • :rotating_light:Deprecation Warning: The st.image parameter format has been renamed to output_format.

For a demo of these features, check out this tutorial:

21 Likes

Really appreciate the video presentation :slight_smile: great idea ! is the code for the app publicly available if we want to play with the features ?

3 Likes

Thanks @andfanilo!

We’re still working on refining the app and hope to release it out into the wild. In the meantime, you can see the source code for each demo here: https://github.com/streamlit/release-demos/tree/master/0.65/demos.

Disclaimer: we’ve discovered a bug with the page config and are working on addressing that!

2 Likes

This bug has been patched with 0.65.1. Please make sure to upgrade to the latest!

1 Like

Hi,

Love the new features!

However upgrading to this version has somehow created a bug related to the session state gist.

I run into

RuntimeError(
            "Oh noes. Couldn't get your Streamlit Session object"
            "Are you doing something fancy with threads?"
)

because the check
s.enqueue == ctx.enqueue
fails. Removing that check works for now, but I imagine it is there for a reason for the check :wink:

In addition, I get the same bug even though I upgraded to 0.65.1. It seems to happen sometimes whenever I interact with the session_state object from above.

Please let me know if I can do anything to help debugging…

Thanks @PeterT, we have another fix we’re running through the ringer now but if you’re able to share, would love to run your code through this new fix.

Patch 0.65.2 has been released and is passed our tests. If people are still encountering an issue with st.beta_set_page_config, please let us know!

I had the same issue and seems like the logic changed. I (hope) i fixed it by updating this part

if (
            # Streamlit < 0.54.0
            (hasattr(s, '_main_dg') and s._main_dg == ctx.main_dg)
            or
            # Streamlit >= 0.54.0
            (not hasattr(s, '_main_dg') and s.enqueue == ctx.enqueue)
        ):
   

with this:

        if s.id == ctx.session_id:
            this_session = s

But maybe some of the streamlit developers can confirm, not that i screwed something up with the session handling.

1 Like

If you don’t plan to use Streamlit <0.56, you can replace this part:

    current_server = Server.get_current()
    if hasattr(current_server, '_session_infos'):
        # Streamlit < 0.56        
        session_infos = Server.get_current()._session_infos.values()
    else:
        session_infos = Server.get_current()._session_info_by_id.values()

    for session_info in session_infos:
        s = session_info.session
        if (
            # Streamlit < 0.54.0
            (hasattr(s, '_main_dg') and s._main_dg == ctx.main_dg)
            or
            # Streamlit >= 0.54.0
            (not hasattr(s, '_main_dg') and s.enqueue == ctx.enqueue)
        ):
            this_session = s

by:

    session_info = Server.get_current()._get_session_info(ctx.session_id)
    this_session = session_info.session

PS: I’m not a streamlit developer, but I’ve been using this method before and after 0.65 update without any issue with my session state implementation.

3 Likes

Great! I am no longer encountering any issues :blush:

1 Like

I tried pip install --upgrade streamlit and I get this massive wall of red :frowning:

These seem to be the issues:

No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

I’m using this in conda on win10, python 3.8.3

The error message here tells you the issue

error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

This is the type of download you tend to do once, and it’s generally applicable to the entire Python scientific ecosystem. The issue is most likely that Apache Arrow requires some compilation steps, which also includes compiling numpy.

Do you know why this might be coming up all of a sudden? :thinking:

So I installed build tools and now I get this error:

  RuntimeError: Not supported on 32-bit Windows
  ----------------------------------------
  ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly

Everything was working fine before. Is there anything I might have overlooked?

It looks like Apache Arrow, which became a dependency in Streamlit 0.63, is not supported with 32-bit Windows. Are you intentionally using 32-bit Windows, or do you have an installation mistake where your Python is 32-bit on a 64-bit system?

Oh okay that makes sense, I’m currently using streamlit 0.62.1 so that’s why I wasn’t running into these issues till now.

According to device specs, my system is indeed 64 bit:

image

However, I had issues with jupyter in conda (64 bit) where it always shows a kernel error and never works. After trying everything fix I could find, it finally worked when I installed the 32 bit version of conda.

And I’m not sure if this is relevant but before conda, python auto downloaded the 32 bit version as well.

Edit: I am a fool lol. There was a bunch of 32 bit app data from older python install before I used conda and after deleting them now everything is fine

Hi Karribear,

Please i’m having this error
AttributeError: module ‘streamlit’ has no attribute ‘beta_set_page_config’

Welcome @DAN_DIGNITY. Can you confirm what version of streamlit your app is running on? You can find out by running streamlit version or in your app, see the About available as the last option in the hamburger menu on the top right.

Thanks @karriebear. i upgraded my streamlit version to the latest and it worked