-
-
Notifications
You must be signed in to change notification settings - Fork 29
-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphviz.backend.CalledProcessError: Command '['dot.bat', '-Tpng']' returned non-zero exit status 1. #43
Comments
Thanks for the report! Could you please include information from the environment where this was run? Should just be |
I have seen a similar bug report in pydot/pydot#207. Both here and there, the user has a space character in the directory path. A possible solution may be to wrap the executable in double quotes in line 37 of
to:
I did a very quick, simple test of a batch script like that in Windows 10 and the resulting
Hopefully that allows for spaces in the directory path. I only have limited access to Windows, so please test it yourself as well. @oliinykmd Maybe you can try this out by finding
It probably contains a line like:
Put double quotes around that first part:
Please report back if that prevents the error. Some resources in case you are wondering about the meaning of all those percent signs: |
@peternowee, could you submit a PR with your fix here? |
@ccordoba12 Sorry, but I do not feel certain enough about the fix to do that. I do not use Windows, conda or conda-forge myself right now, so I cannot oversee possible side-effects of this and I am not able to do extensive testing. I only did a very quick manual run of a manually created batch file containing only this snippet of code on a Windows CI VM to see if the |
This worked for me! Trying to run the line My anaconda3 environments were installed in Users/Bryan Lanier/... and I was also getting same error since it would complain about 'C:\Users\Bryan...' The quotes around the code in dot.bat was all I needed. Only thing to note was, that for me, I had to find the dot.bat that was in Thanks a million for finding this simple fix |
It took me so many search to find this simple fix. Thanks!!!!!! |
Could someone please retest this with the latest packages? |
Going to tentatively close. We are now building Windows from source with PR ( #59 ). So no longer include or need this batch script |
Should prevent problems finding the Graphviz executables when using the legacy `.bat` files. Should fix conda-forge#43
Should prevent problems finding the Graphviz executables when using the legacy `.bat` files. Should fix conda-forge#43
Hi!
I'm sorry, actually I'm a doctor, so again, I'm sorry for my code and explanation, but here is the error
Code:
xgb.plot_tree(model, num_trees=0)
rcParams['figure.figsize'] = 80, 50
'C:\Users\Ruslan' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:/Users/Ruslan Oliinyk/PycharmProjects/XGB_Facebook/income.py", line 89, in
xgb.plot_tree(model, num_trees=0)
File "C:\Users\Ruslan Oliinyk\Anaconda3\lib\site-packages\xgboost\plotting.py", line 281, in plot_tree
s.write(g.pipe(format='png'))
File "C:\Users\Ruslan Oliinyk\Anaconda3\lib\site-packages\graphviz\files.py", line 138, in pipe
quiet=quiet)
File "C:\Users\Ruslan Oliinyk\Anaconda3\lib\site-packages\graphviz\backend.py", line 231, in pipe
out, _ = run(cmd, input=data, capture_output=True, check=True, quiet=quiet)
File "C:\Users\Ruslan Oliinyk\Anaconda3\lib\site-packages\graphviz\backend.py", line 174, in run
output=out, stderr=err)
graphviz.backend.CalledProcessError: Command '['dot.bat', '-Tpng']' returned non-zero exit status 1. [stderr: b"'C:\Users\Ruslan' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"]
Thank you!
The text was updated successfully, but these errors were encountered: