Open connerpate opened 4 years ago
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.
Same error here. The link above on StackOverflow does not provide instructions that worked for me. The error message I have is:
ValueError:
The orca executable is required in order to export figures as static images,
but the executable that was found at '/usr/local/bin/orca'
does not seem to be a valid plotly orca executable. Please refer to the end of
this message for details on what went wrong.
That's on Google colab.
#######Try with installing these packages on Colab:
!pip install plotly==4.7.1 !wget https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O /usr/local/bin/orca !chmod +x /usr/local/bin/orca !apt-get install xvfb libgtk2.0-0 libgconf-2-4 import plotly.graph_objects as go
fig.show() fig.write_image("figname.png")#change format if needed
fig.show() fig.write_image("gdrive/My Drive/destinationfolder/figname.png")
Did you try saving in svg format? I feel png is the default format in plotly and it may not require orca. I could try to rerun your code but I am pretty sure this is what I did. The orca executable could not be run correctly for me. Let me know if svg works. It's a much better format.
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.
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)