Is there a reason why streamlit won't load new pages?

I have just updated the data in the app and added a few lines of code. When I try to change pages or to load different segments/columns of the data it does not change, it remains in the same state. The select boxes are changing but other parts of the data are not changing. Any reason why this is?

This is the app before the update
Hnet-image (4) (1)

This is after the update
Hnet-image (10) (1)

Another example is where I click on a new page called ‘Economy’. Before the update, it showed this:

After the update, it showed this:

It has not loaded and still remains on options chosen beforehand.

You can have a look for yourself here

Any reason for this? I have not implemented the session state in my code and I did not think we had to for these function to operate.

Would appreciate the help, thank you.

Seems to work for me, the way you show in your “before the update” animations…

Ahh. I’ve managed to get it to break.

There seems to be a bug in the latest streamlit release - can you roll back to the previous one? Alternatively, you can try, wherever you are providing options to a multiselect widget, to first wrap them into a list() call, but this may be a bit tedious for your app. I’d probably roll back to 0.83 for now, and keep an eye on this GitHub issue.

1 Like

Ah okay, thought I was going mad. Not entirely sure how to use 0.83. As I am using their cloud deployment, I don’t think I have control over the version. Or do I?

Sorry, I use a separate server, so I’m not sure. You might be able to use a requirements file, but I’ll have to let other who actually know the answer to help you with that one, I’m afraid!

No problem, thanks for your help :slight_smile:

Hi @Rushmore ! Thank you for bringing this up to us. We have a filed ticket that speaks to something similar. Discrepancy between value shown and value returned by widged when it is redisplayed · Issue #3512 · streamlit/streamlit · GitHub

Essentially, by unifying session state with the widget “state” we can do a better job of garbage collecting when widgets are removed from the page. We have prioritized this for a patch release later this week. We have some outstanding questions and want to make sure we address the issue thoroughly.

Thank you for your patience and kindness with us! Session State is a really awesome feature with some unique use cases. We’re ironing out a couple challenges based on analyzing users’ use cases and get it to a super smooth experience. :blush:

2 Likes