Closed ThinkNaive closed 2 years ago
sorry I didn't install the Graphviz dependency.
No worries; can we close the issue then?
I am curious why you got a PermissionError
instead of an OSError
, any idea?
Sorry, I have no idea about the error. Maybe it is attributed to WSL implementation.
No worries; can we close the issue then?
I am curious why you got a
PermissionError
instead of anOSError
, any idea?
I test with a minimum example on Ubuntu WSL2 with the code:
from subprocess import run
from pathlib import PosixPath
run([PosixPath("dot")])
and the error message is as follows:
Traceback (most recent call last):
File "/mnt/f/OSNotes/test.py", line 4, in <module>
run([PosixPath("dot")])
File "/usr/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: PosixPath('dot')
I also test this:
from subprocess import run
run(["what?"])
and get same error.
Thanks, let me look into that.
I tried to use APIs such as
graphviz.version()
org.render()
but encoutered errorsPermissionError: [Errno 13] Permission denied: PosixPath('dot')
likeand like
My environment is Anaconda Python 3.9.12 in Windows 10 WSL2 Ubuntu 20.04. However, I can run the code above on Ubuntu real machine.