question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Orca executable in Colab not recognized

See original GitHub issue

I have been using orca to export .svg images of charts generated in Google Colab via Plotly to my Google Drive. This worked perfectly until late last week, when I started getting an error message saying that the orca executable I install in a Drive location as part of the notebook setup was not “a valid plotly orca executable” whenever I ran code to generate/export the chart.

Below is the full error text:

_ValueError Traceback (most recent call last) <ipython-input-15-a1d832d36777> in <module>() 39 if output_plots: 40 file_name = output_folder + ‘/’ + ‘NeighborhoodProfiles_TotalPopulations.svg’ —> 41 fig.write_image(file_name)

4 frames /usr/local/lib/python3.6/dist-packages/plotly/io/_orca.py in validate_executable() 1182 for more info on Xvfb 1183 “”" -> 1184 raise ValueError(err_msg) 1185 1186 if not help_result:

ValueError: The orca executable is required in order to export figures as static images, but the executable that was found at ‘/content/orca-1.2.1-x86_64.AppImage’ does not seem to be a valid plotly orca executable. Please refer to the end of this message for details on what went wrong.

If you haven’t installed orca yet, you can do so using conda as follows:

$ conda install -c plotly plotly-orca

Alternatively, see other installation methods in the orca project README at https://github.com/plotly/orca

After installation is complete, no further configuration should be needed.

If you have installed orca, then for some reason plotly.py was unable to locate it. In this case, set the plotly.io.orca.config.executable property to the full path of your orca executable. For example:

>>> plotly.io.orca.config.executable = '/path/to/orca'

After updating this executable property, try the export operation again. If it is successful then you may want to save this configuration so that it will be applied automatically in future sessions. You can do this as follows:

>>> plotly.io.orca.config.save()

If you’re still having trouble, feel free to ask for help on the forums at https://community.plot.ly/c/api/python

Here is the error that was returned by the command $ /content/orca-1.2.1-x86_64.AppImage --help

[Return code: 1]

Note: When used on Linux, orca requires an X11 display server, but none was detected. Please install Xvfb and configure plotly.py to run orca using Xvfb as follows:

>>> import plotly.io as pio
>>> pio.orca.config.use_xvfb = True

You can save this configuration for use in future sessions as follows:

>>> pio.orca.config.save() 

See https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml for more info on Xvfb_

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

0reactions
rlphillipscommented, Jul 15, 2020

Hello! To add to this discussion, I’ve tried both the solutions described by @1382Lubster and @emmanuelle . The executable seems to install correctly, but apparently there’s a communication error between the orca server . I’m assuming there’s a firewall issue, maybe? I wasn’t able to make it work in Colab.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly missing orca - python - Stack Overflow
I have small problem when exporting static chart using plotly. Plotly does not correctly recognize that I have orca installed ...
Read more >
Orca management in Python - Plotly
Detailed examples of Orca Management including changing color, size, log axes, and more in Python.
Read more >
Introducing Kaleido - Plotly - Medium
When Kaleido is installed, plotly.py 4.9.0+ will automatically use it for image export operations, falling back to Orca if Kaleido is not ......
Read more >
kaleido - PyPI
Releases of the core kaleido C++ executable are attached as assets to GitHub ... Also, conda is still not as universally available as...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Description: Placeholder package for Apple's analogue to non-GNU libunwind ... All of these programs are built into a single executable, bam.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found