Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlit 1.24.1 scrambling page order #52

Closed
dzmitry-kankalovich opened this issue Jul 25, 2023 · 0 comments · Fixed by #101
Closed

Streamlit 1.24.1 scrambling page order #52

dzmitry-kankalovich opened this issue Jul 25, 2023 · 0 comments · Fixed by #101

Comments

@dzmitry-kankalovich
Copy link

Possibly related: #46

I am too facing the problem with combination of latest st_pages and streamlit 1.24.1.

In my case the order of pages is scrambled for whatever reason.

For now I just experimentally figured out that 0.4.1 and 1.24.0 combo seem to work.

As far as I get, the problem is along these lines:

def _show_pages(pages: list[Page]):
    current_pages: dict[str, dict[str, str | bool]] = get_pages("")  # type: ignore
    if set(current_pages.keys()) == set(p.page_hash for p in pages):
        return

In the latest version streamlit.source_util.get_pages("") seem to return unordered list of pages, and I suspect this is what causes the problem.

@dzmitry-kankalovich dzmitry-kankalovich changed the title Streamlit Streamlit 1.24.1 breaking change Jul 25, 2023
@dzmitry-kankalovich dzmitry-kankalovich changed the title Streamlit 1.24.1 breaking change Streamlit 1.24.1 scrambling page order Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant