Skip to content

With newer versions of orjson, users need to specify the json engine explicitly (bug?) #3567

Closed
@xucian

Description

@xucian

Hey

I found out I get an
AttributeError: partially initialized module 'orjson' has no attribute 'OPT_NON_STR_KEYS'
if I don't specify this
plotly.io.json.config.default_engine = 'orjson'
when using orjson v3.6.6 (latest as of 25jan2022)

Also, additional note for whoever might have this issue: you don't need to uninstall orjson if you don't want to use it. just set the engine to 'json' explicitly.

I'm using orjson because of the performance claims, although I ran some tests switching between the 2 engines and they seem to yield the same results: using go.Candlestick with 10000 candlesticks and some 4-5 indicators, getting ~0.8sec in each case for creating the plot. My purpose is to improve the dash server performace, but it seems it makes no difference (the web page still renders slower than the ticker even with 600 candles)

Metadata

Metadata

Assignees

Labels

bugsomething brokensev-1blocker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions