ORCA Error from Windows IIS

Hello,

When using Windows IIS to deploy my Flask app using Plotly with Orca I receive the following error. This error does not happen when running the program using the VS Code editor via werkzeug. I have no idea what might be wrong or how to fix it and I do not know how to save the plotly chart to image any other way or how to access the chart via the matplotlib and save to BytesIO etc. All help appreciated!

Error occurred:

Traceback (most recent call last):
File “.\app\report\views.py”, line 2227, in generate_technical_availability_report
pio.write_image(fig[‘fig’], os.path.join(os.path.dirname(file), ‘static\images{}.png’).format(fig[‘title’]))
File “c:\python36\lib\site-packages\plotly\io_orca.py”, line 1513, in write_image
validate=validate)
File “c:\python36\lib\site-packages\plotly\io_orca.py”, line 1295, in to_image
ensure_server()
File “c:\python36\lib\site-packages\plotly\io_orca.py”, line 1202, in ensure_server
stdout=DEVNULL)
File “c:\python36\lib\subprocess.py”, line 665, in init
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File “c:\python36\lib\subprocess.py”, line 919, in _get_handles
errwrite = _winapi.GetStdHandle(_winapi.STD_ERROR_HANDLE)
OSError: [WinError 6] The handle is invalid

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online