Chris Green wrote: > I have a fairly simple little python program to automate starting an > editor on a wiki page. It works fine on the system where I wrote it > (xubuntu 16.04, python 3 version 3.5.2) but it comes up with the > following error on a newer system (xubuntu 17.10, python 3 version > 3.6.3). > > Here is the error:- > > chris$ no > Traceback (most recent call last): > File "/home/chris/bin/no", line 59, in <module> > os.execvp("vi", ("", monthFile,)) > File "/usr/lib/python3.6/os.py", line 559, in execvp > _execvpe(file, args) > File "/usr/lib/python3.6/os.py", line 594, in _execvpe > exec_func(fullname, *argrest) > ValueError: execv() arg 2 first element cannot be empty > > Has execvp() become stricter in 3.6.3 or what?
Yes; the relevant issue on the bug tracker seems to be https://bugs.python.org/issue28732 > ... and here is the program:- [snip] A smaller demo is $ cat demo.py import os os.execvp("ls", ("",)) $ python3.5 demo.py demo.py $ python3.6 demo.py Traceback (most recent call last): File "demo.py", line 2, in <module> os.execvp("ls", ("",)) File "/usr/local/lib/python3.6/os.py", line 559, in execvp _execvpe(file, args) File "/usr/local/lib/python3.6/os.py", line 594, in _execvpe exec_func(fullname, *argrest) ValueError: execv() arg 2 first element cannot be empty -- https://mail.python.org/mailman/listinfo/python-list