ecksbee / telefacts

XBRL file storage, data types, and renderer.
Apache License 2.0
1 stars 0 forks source link

Error rendering some networks #98

Closed tdurtschi closed 7 months ago

tdurtschi commented 7 months ago

example URL which fails:

https://edgarbrowser.com/review/?path=%2FArchives%2Fedgar%2Fdata%2F1445305%2F000144530522000110%2F0001445305-22-000110-index.htm

2024/03/21 15:53:11 Getting renderable for:http://www.workiva.com/role/StockBasedCompensationEmployeeStockPurchasePlanDetails
2024/03/21 15:53:11 Network:b8d6d55ca3d34f8be977a0cab0bae837
panic: runtime error: slice bounds out of range [:5] with length 4

goroutine 10424 [running]:
github.com/joshuanario/digits.lowPrecisionTruncate(0xc015101c90?, {0xc009d95858, 0x4}, 0x13?)
        /Users/teagan/go/pkg/mod/github.com/joshuanario/digits@v0.5.1/helpers.go:55 +0xa5
github.com/joshuanario/digits.New(0x2, {0xc009d95858, 0x4}, 0x2c, 0x2)
        /Users/teagan/go/pkg/mod/github.com/joshuanario/digits@v0.5.1/digits.go:22 +0x99
ecksbee.com/telefacts/pkg/renderables.renderNumeric({0xc009d95858?, 0xffffffffffffffff?}, 0xc00d6f7b00?, 0xc340288?)
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/fact.go:74 +0x30
ecksbee.com/telefacts/pkg/renderables.SigFigs({0xc009d95858?, 0xc009d95870?}, 0xb?, 0x37d0125?, 0x30?)
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/fact.go:60 +0xb2
ecksbee.com/telefacts/pkg/renderables.renderEnglishFact(0xc0070f7320, {0x3c4ee70, 0xc00aef81e0}, {0x3c4dcc0, 0xc00aef81e0})
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/english.go:56 +0x165
ecksbee.com/telefacts/pkg/renderables.render(0xc0070f7320, {0x3c4ee70, 0xc00aef81e0}, {0x3c4dcc0, 0xc00aef81e0}, {0xc012658980, 0x5, 0x34?})
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/fact.go:42 +0x428
ecksbee.com/telefacts/pkg/renderables.getFactualQuadrant({0xc0027dc620, 0xe, 0xc000408008?}, {0xc00a920c08, 0x7, 0x0?}, {0x3c4ee48, 0xc00aef81e0}, {0x3c4ee70, 0xc00aef81e0}, ...)
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/factualQuadrant.go:44 +0x82c
ecksbee.com/telefacts/pkg/renderables.getPFactualQuadrant({0xc00d4f5188, 0xe, 0xc0092894a0?}, {0xc00a920c08, 0x7, 0x38}, {0x3c4ee48, 0xc00aef81e0}, {0x3c4ee70, 0xc00aef81e0}, ...)
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/presentationGrid.go:133 +0x1ac
ecksbee.com/telefacts/pkg/renderables.pGrid({0xc00d7dd620, 0x21}, {0xc0137c0240?, 0x52?}, 0xc00aef81e0, {0x3c4ee48, 0xc00aef81e0}, {_, _}, {0x3c4dcc0, ...})
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/presentationGrid.go:43 +0x62a
ecksbee.com/telefacts/pkg/renderables.MarshalRenderable.func1({0xc00d7dd620?, 0xc0014a17d0?}, {0xc0137c0240?, 0xc014c64f80?})
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/renderable.go:58 +0x106
created by ecksbee.com/telefacts/pkg/renderables.MarshalRenderable in goroutine 1
        /Users/teagan/go/pkg/mod/github.com/ecksbee/telefacts@v0.0.0-20240213/pkg/renderables/renderable.go:56 +0x4c5
exit status 2
joshuanario commented 7 months ago

This issue is related to this issues in digits. https://github.com/joshuanario/digits/issues/14