저는 100 줄 3 년 된 파이썬 스크레이퍼를 가지고 있습니다. 시작 라인은 :이 오류를 읽어야하고 무엇을 어떻게Python : OSError : [Errno 2] 해당 파일이나 디렉토리가 없습니다. ''
python script.py
Traceback (most recent call last):
File "script.py", line 2, in <module>
os.chdir(os.path.dirname(sys.argv[0]))
OSError: [Errno 2] No such file or directory: ''
:
import urllib, re, os, sys, time # line 1: import modules
os.chdir(os.path.dirname(sys.argv[0])) # line 2: all works in script's folder > relative address
# (rest of my script here!)
실행
$cd /my/folder/
$python script.py
내가 오류가 발생?
오류가 계속 발생합니다. – MontyPython