python - Pydot Error during install. What is assertion 1? -
i have been attempting pydot create organization tree. tree quite large.
i installed pydot using pip tried using following code:
graph = pydot.dot(graph_type='graph') manager in new_df['manager'].unique(): edge = pydot.edge('top', manager) graph.add_edge(edge) manager in new_df['manager'].unique(): key, row in new_df.iterrows(): if row['manager'] == manager: edge = pydot.edge(row['employee'], manager) graph.add_edge(edge) graph.write_png('test.png') on final line graph.write_png. got following error:
graph.write_png('test.png') traceback (most recent call last): file "<ipython-input-11-6b37b0a95d4d>", line 1, in <module> graph.write_png('test.png') file "c:\users\name\appdata\local\continuum\anaconda3\lib\site-packages\pydot.py", line 1691, in <lambda> self.write(path, format=f, prog=prog)) file "c:\users\name\appdata\local\continuum\anaconda3\lib\site-packages\pydot.py", line 1774, in write s = self.create(prog, format) file "c:\users\name\appdata\local\continuum\anaconda3\lib\site-packages\pydot.py", line 1883, in create prog=prog)) exception: "dot.exe" not found in path. i followed overflow answer "dot.exe" not found in path. pydot on python (windows 7) exception being editing keras code not using keras. seemed resolve problem gave following error computer/python skills cannot decipher.
note using windows 10.
['dot.exe', '-tpng', 'c:\\users\\name\\appdata\\local\\temp\\tmp4b8y10em'] return code: 1 stdout, stderr: b'' b"error: c:\\users\\name\\appdata\\local\\temp\\tmp4b8y10em: syntax error in line 16 near ';'\r\n" traceback (most recent call last): file "<ipython-input-12-6b37b0a95d4d>", line 1, in <module> graph.write_png('test.png') file "c:\users\name\appdata\local\continuum\anaconda3\lib\site-packages\pydot.py", line 1691, in <lambda> self.write(path, format=f, prog=prog)) file "c:\users\name\appdata\local\continuum\anaconda3\lib\site-packages\pydot.py", line 1774, in write s = self.create(prog, format) file "c:\users\name\appdata\local\continuum\anaconda3\lib\site-packages\pydot.py", line 1900, in create assert p.returncode == 0, p.returncode assertionerror: 1 any ideas? stumped, need work.
Comments
Post a Comment