Skip to content

It stopped working #168

@Nemecsek

Description

@Nemecsek

With this demo code I was able to make some experiments, but then it stopped working completely.
I restarted the browser, tried with different browsers, restarted the app, removed the lock but nothing works anymore and the browsers is in an infinite loop tills it crashes.

import streamlit as st
from streamlit_server_state import server_state, server_state_lock

with server_state_lock["u1"]:
    if "u1" not in server_state:
        server_state.u1 = 0
        
server_state.u1 = server_state.u1 + 1

st.write(server_state.u1)

Traceback is

2023-01-26 13:02:04.236 Uncaught app exception
Traceback (most recent call last):
  File "/home/alex/PycharmProjects/test_bluelikon_client_streamlit/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/home/alex/PycharmProjects/test_bluelikon_client_streamlit/singleuser.py", line 12, in <module>
    st.write(server_state.u1)
  ...
  File "/home/alex/PycharmProjects/test_bluelikon_client_streamlit/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_requests.py", line 157, in on_scriptrunner_yield
    return ScriptRequest(ScriptRequestType.RERUN, self._rerun_data)
  File "<string>", line 3, in __init__
RecursionError: maximum recursion depth exceeded while calling a Python object

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions