Bad message format - Bad 'setIn' index 9 (should be between [0, 4])

I am creating a dashboard which continuously calls a function to get new values. The latency for that is 1s. I am doing it by using the python schedule library as -

dynamically_change = st.empty()

def get_value():
      value = some_another_function()
       dynamically_change.write(value)
      return None

schedule.every(1).second.do(get_value)
while True:
      schedule.run_pending()
      time.sleep(1)

Now everything works perfectly. The schedular is calling the function correctly and the returned value is also as expected. However, after every run, it is showing me this message -

As such, it is not breaking my app, neither it is messing with the returned value as the dashboard is running continuously in the background. What I thus would be requiring would be to either how to solve this error, or if convenient, how to suppress this message?

my pip freeze requirements.txt gives:

pandas = β€œ==1.1.4”
numpy = β€œ==1.19.4”
streamlit = β€œ==0.70.0”
matplotlib = β€œ==3.3.2”
pydeck = β€œ==0.5.0”
opencv-python = β€œ==4.4.0.46”
pillow = β€œ==8.0.1”
schedule = β€œ==0.6.0”
utm = β€œ==0.6.0”

Am using python version 3.8, and as there was a similar issue which involved browser compatibility, issues; I checked mine and am running Edge-Chromium v83 so I guess that shouldn’t be an issue.

1 Like

Hi @Saumya-Bhatt -

It’s not really clear what your code is doing here, can you provide a repo where this code is located?

Best,
Randy

I have this issue too. Is there a new problem with Chrome not being able to consume the data stream between it and the st server?

2 Likes