Get help from the marimo community

Updated 3 months ago

BlockingIOError in edit mode

Posted by @nellyg

I am finding that quite frequently (and randomly) I am getting things getting stuck trying to display if they are large outputs (an accordion of multiple altair charts for example)

And I am seeing this output in the console:

Plain Text
[W 240925 08:18:26 distributor:64] BlockingIOError in distributor receive: [Errno 35] Resource temporarily unavailable
A
n
15 comments
We fixed this in run mode. Fixing it in edit mode is trickier but I think I can do it.

Out of curiosity, have you increased MARIMO_OUTPUT_MAX_BYTES

In the meantime, if you wrap your altair charts in mo.ui.altair_chart, I think the outputs should be much smaller (we store the data on the backend, whereas altair serializes it as JSON by default), but let me know if it isn't
Additionally, can you please post the full stackt trace?
I tried reproducing with an accordion of altair charts but couldn't —

  • without increasing MARIMO_OUTPUT_MAX_BYTES, i hit the max bytes image but couldn't
  • increasing MARIMO_OUTPUT_MAX_BYTES, I kept on increasing the number of plots. I never saw the blocking IO error but eventually the frontend crashed.
any help in reproducing would be appreciated.
Let me see if I can reproduce it for you. I do have MARIMO_OUTPUT_MAX_BYTES set really high. It is weird because my app has ~10 different accordions. On any given run it is likely that ~8 work and 1 or 2 freeze forever
There is no full stack trace anywhere. Is there some debug variable I can set to see more?
ah right of course, never mind
I would recommend wrapping your plots in mo.ui.altair_chart() and seeing if that fixes it
Okay I will give that a try and let you know. Thanks
That did in fact seem to work. Thanks!
Ah wait. Nope. I still have some hanging. Let me see if I can reproduce something for you
@nellyg — any chance you have uvloop installed in your environment?
If you do have uvloop installed, I would be curious whether this PR fixes it for you: https://github.com/marimo-team/marimo/pull/2442
I will check on this!
That seems like it fixed it! Thank you!
Fantastic! It was a bug or bad interaction with uvloop
Add a reply
Sign up and join the conversation on Discord