Orca executable in Colab not recognized
See original GitHub issueI 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:
- Created 4 years ago
- Comments:5
Top GitHub Comments
Hi @connerpate maybe the solution described in https://stackoverflow.com/questions/57262385/saving-or-downloading-plotly-iplot-images-on-google-colaboratory/57272111#57272111 can help.
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.