SVG String Bug

I am pretty sure this is a Mathematica ExportString [ , “SVG”] bug.

x^2+y^2<1 fails

x^2+y^2>1 works!

The graphic code is from Bostok, pretty sure that is working, maybe needs a bit alteration for Mathematica?

There is a nagging Syntax error, which I do not have the expertise to track.

If someone could figure out the bug then I can send to techsupprot @ wolfram.


Both seem to work fine for me. Are you perhaps referring to the red error message that says
“SyntaxError: Unterminated template literal”

That’s just a separate cell that can be deleted.

<1 fails for me in Observable Notebook, works in Mathematica

It looks like the string being returned is too long and it’s getting cut off.

It failed on my iPhone but works on my Macbook Pro - here’s what it looks like there:

It fails on FireFox and Safari on my iMac!

This is bizarre!


Thanx, could you tell me in which part of the code what quota I need to increase?

Appreciate the help


I think you’d need to change the output limit for the Wolfram Cloud function.

Thanx, I will suggest that to their engineering and see what they say and will report back


1 Like

I am getting this Observable error

text = SyntaxError: JSON.parse: unterminated string at line 1 column 7077889 of the JSON data

text = (await fetch(url1)).json()

Why it works on your machine and not on my mine?


Also to inform you all that Dashed boundaries with different Colors did not work with Mathematica’s ExportString [ ] and I am sure there is a way to solve that, and I am going to write to techsupport about.

Seemingly if I Export from the grammar and then APIFunction on the Wolfram Cloud there are differences to the output String than if directly Export from my desktop into a file.

This we have seen many times and always found a workaround.

It is a flaw which Wolfram over the years has done a good job addressing but still some leftovers here and there.


Dear Mark

Several of our programmers test this notebook on their machines in USA and some were working and some failed.

There is a discrepancy between Observable notebooks perhaps? Wolfram Cloud spews the same for all of them.

Possibly our friend j-F1 mentioned that some String is too long and truncated.

I cannot call the techsupport at wolfram for a ticket, I cannot establish Mathematica as the culprit.


Well, you can take Observable out of the picture easily enough by just opening the URL in a web browser. If the resulting string is not a complete SVG, then you’ve got your culprit.

Damn that was easy.

I will post a ticket at Wolfram techsupport an report back