orca icon indicating copy to clipboard operation
orca copied to clipboard

Double forwardslash in the plotlyjs path causes a ReferenceError

Open Konstantin-Lasiy opened this issue 6 years ago • 0 comments

When trying to write_image through plotly in Python the following command gets executed to start the orca server: ['//anaconda3/bin/orca', 'serve', '-p', '9091', '--plotly', '//anaconda3/lib/python3.7/site-packages/plotly/package_data/plotly.min.js', '--graph-only', '--mathjax', 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js']

This causes a timeout error, and if I start the server with the same command through a console with the --debug option and then try to write_image I get {"severity":"ERROR","textPayload":"renderer error - Uncaught ReferenceError: Plotly is not defined"}

The workaround is to start the server in the terminal either without specifying the --plotly path or by removing one of the forwardslashes for the --plotly parameter like this //anaconda3/bin/orca serve -p 9091 --debug --graph-only --plotly /anaconda3/lib/python3.7/site-packages/plotly/package_data/plotly.min.js

Curiously, the orca path can have the forwardslashes without a problem. Is there any way to modify the plotlyjs parameter and remove the double forwardslash?

plotly version 4.3 python: 3.7 orca: 1.2.1

Konstantin-Lasiy avatar Dec 11 '19 00:12 Konstantin-Lasiy