tail: cannot open 'home/sourabh/sanju.txt' for reading: No such file or directory
Traceback (most recent call last):
File "/home/sourabh/resizeWindow.py", line 23, in <module>
line = subprocess.check_output(['tail', '-1', 'home/sourabh/sanju.txt']).split(' ')[3:]
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['tail', '-1', 'home/sourabh/sanju.txt']' returned non-zero exit status 1
我已经交叉检查文件是否存在,甚至故意创建了一个文件。
我的python代码中的确切行是:
line = subprocess.check_output(['tail', '-1', 'home/sourabh/sanju.txt']).split(' ')[3:]
相关分类