Conversation
|
I found out that widgetti/solara currently required altair<6 but python 3.14 supports altair==6 only , hence I have made the neccessary changes in pyproject.toml I have also made changes so that the code now detects the altair version and renders accordingly. If older altair is used then original older rendering is used else it uses the new VegaLite rendering method, this probably makes it future proof if solara doesn't fix the issue. |
|
Fixes #3046 |
|
Hi , @quaquel is there anything I can help with in this regard ? |
|
Thanks @champ-byte for this PR, can you include a image of how the newer |
Hi, Thank you looking into the PR. The graphs look exactly the same but still attaching both the graphs for confirmation. |
|
As of Solara 1.57.1 Altair 6 is supported (see widgetti/solara#1127), does that have implications for this PR? Should we revert (part of) it? |
|
The edits by this PR works but now are unnecessary due to the |


Summary
Rendering issue for mesa examples with altair backend due to the latest version altair==6
Bug / Issue
Error:

python version used: 3.13.5
altair version ==6
The error occurs because the software is looking for specific older versions of the Vega-Lite format (v4 or v5) within the data's MIME bundle, but only a newer version (v6) is present
Implementation
Since the issue is due to widgetti/solara (mentioned here: [widgetti/solara/issues/1127]) and due to mesa , I think the simplest temporary fix is to downgrade the altair version <6 .
Another approach would be the whitelist or blacklist version and render an html iframe as a fallback , but again this won't be future proof and unnecessary hassle.
We cannot directly add a fallback by using try and catch(making it future-proof) since , Solara catches the error internally and displays it in the UI, so Python's try-catch can't intercept it. The error happens during the frontend rendering phase, not during Python execution.
Additional Notes
If I am missing on any point or you would want me to follow a certain approach I would be happy to do that !