Black Lives Matter. Please consider donating to Black Girls Code today.

FileNotFoundError: [WinError 2] The system cannot find the file specified

Hi Team,

I was using Plotly write_image function for few day today suddenly I get an error and I am unable to write images now (below is the error)

I tried to uninstall and reinstall plotly-orca but it did not helped.

FileNotFoundError Traceback (most recent call last)
in
104 #fig1.update_traces(textposition=‘outside’)
105 #fig1.show()
–> 106 fig1.write_image(output_path + ‘commodity_level_client_graph.jpeg’)

~\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\basedatatypes.py in write_image(self, *args, **kwargs)
2822 import plotly.io as pio
2823
-> 2824 return pio.write_image(self, *args, **kwargs)
2825
2826 # Static helpers

~\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\io_orca.py in write_image(fig, file, format, scale, width, height, validate)
1765 # Do this first so we don’t create a file if image conversion fails
1766 img_data = to_image(
-> 1767 fig, format=format, scale=scale, width=width, height=height, validate=validate
1768 )
1769

~\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\io_orca.py in to_image(fig, format, width, height, scale, validate)
1530 # Make sure orca sever is running
1531 # -------------------------------
-> 1532 ensure_server()
1533
1534 # Handle defaults

~\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\io_orca.py in ensure_server()
1388 # Validate orca executable only if server_url is not provided
1389 if status.state == “unvalidated”:
-> 1390 validate_executable()
1391 # Acquire lock to make sure that we keep the properties of orca_state
1392 # consistent across threads

~\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\io_orca.py in validate_executable()
1143 with orca_env():
1144 p = subprocess.Popen(
-> 1145 executable_list + ["–help"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
1146 )
1147

~\AppData\Local\Continuum\anaconda3\lib\subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
727 c2pread, c2pwrite,
728 errread, errwrite,
–> 729 restore_signals, start_new_session)
730 except:
731 # Cleanup if the child failed starting.

~\AppData\Local\Continuum\anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1015 env,
1016 os.fspath(cwd) if cwd is not None else None,
-> 1017 startupinfo)
1018 finally:
1019 # Child is launched. Close the parent’s copy of those pipe

FileNotFoundError: [WinError 2] The system cannot find the file specified