If you create a dataframe of random numbers with say 1000 lines.
df = pd.DataFrame(np.random.randint(0,1000,size=(1000, 9)), columns=list(‘ABCDEFGHI’))
and you then want to save a scatter graph like this:
import plotly.express as px
fig1 = px.scatter(df, x=“A”, y=“B”, size=“D”, color=“E”,
hover_name=“F”, )
fig1.update_layout(title=‘test’,width=1200,height=500)
fig1.show()
and you then want to save that image
call([‘orca’, ‘graph’, json.dumps(fig1, cls=plotly.utils.PlotlyJSONEncoder), ‘-o’, ‘graph_name’,’-d’,‘images’,’-f’,‘svg’])
you get this error message below. if i reduce the size of the dataframe to 800 lines then it works.
any idea how to remove this size cap ?
FileNotFoundError Traceback (most recent call last)
in
----> 1 call([‘orca’, ‘graph’, json.dumps(fig1, cls=plotly.utils.PlotlyJSONEncoder), ‘-o’, ‘graph_name’,’-d’,‘images’,’-f’,‘svg’])
C:\ProgramData\Anaconda3\lib\subprocess.py in call(timeout, *popenargs, **kwargs)
321 retcode = call([“ls”, “-l”])
322 “”"
–> 323 with Popen(*popenargs, **kwargs) as p:
324 try:
325 return p.wait(timeout=timeout)
C:\ProgramData\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, text)
773 c2pread, c2pwrite,
774 errread, errwrite,
–> 775 restore_signals, start_new_session)
776 except:
777 # Cleanup if the child failed starting.
C:\ProgramData\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)
1176 env,
1177 os.fspath(cwd) if cwd is not None else None,
-> 1178 startupinfo)
1179 finally:
1180 # Child is launched. Close the parent’s copy of those pipe
FileNotFoundError: [WinError 206] The filename or extension is too long