Crash when serializing division with LaTeX
See original GitHub issueVersion: 0.4.4
Steps:
- Initialize Compute Engine
- Set
jsonSerializationOptions.metadata = ['latex']
- Parse
1/x
- Try to print the MathJson for the resulting
BoxedExpression
.
Here’s a quick node
session replicating the problem:
> const ComputeEngine = require("@cortex-js/compute-engine").ComputeEngine
undefined
> let myCe = new ComputeEngine()
undefined
> myCe.parse("1/x").json
[ 'Divide', 1, 'x' ]
> myCe.jsonSerializationOptions.metadata = ['latex']
[ 'latex' ]
> myCe.parse("1/x").json
Uncaught TypeError: Converting circular structure to JSON
--> starting at object with constructor 'global'
--- property 'global' closes the circle
at JSON.stringify (<anonymous>)
at /Users/bengold/brilliant/node_modules/@cortex-js/compute-engine/dist/compute-engine.min.js:2:69692
at Ne.serialize (/Users/bengold/brilliant/node_modules/@cortex-js/compute-engine/dist/compute-engine.min.js:2:69710)
at ke.serialize (/Users/bengold/brilliant/node_modules/@cortex-js/compute-engine/dist/compute-engine.min.js:2:74791)
at zt.serialize (/Users/bengold/brilliant/node_modules/@cortex-js/compute-engine/dist/compute-engine.min.js:2:267194)
at vi (/Users/bengold/brilliant/node_modules/@cortex-js/compute-engine/dist/compute-engine.min.js:2:140335)
at Oi.get json [as json] (/Users/bengold/brilliant/node_modules/@cortex-js/compute-engine/dist/compute-engine.min.js:2:163316)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Help writing a simple long division problem with LaTex - TeX
I started a new creative job and somehow got asked to write a LaTex code snippit that depicts the following division.
Read more >Parsing and Serializing LaTeX - CortexJS
“The Divide function is represented as “ \frac{x}{y} ””. The Compute Engine includes a default LaTeX dictionary to parse a number of common...
Read more >TensorBoard with Histograms crashes with Dropout Layers
The most recent version of Keras crashes after the first epoch when a TensorBoard callback is added that records histograms.
Read more >Untitled
New zealand role models, Rugby league 4 nations tournament, 36 division, ... Hendrick nascar plane crash, Pemain widya jemari jiwaku menari, Kasi arunodayam ......
Read more >Expected BEGIN_OBJECT but was STRING at line 1 column 1
Basically I needed to deserialize following nested JSON String into my ... you may need to do some try..catch.. for this strange response...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a million, Arno! Super excited to get these fixes (and some of the new features in compute engine) integrated 😄
I’ve published
compute-engine@0.5.0
that incorporate these changes and a correspondingmathlive@0.5.0
.