Ho un raschietto per pitone di 100 righe, 3 anni che ora è un bug. le linee di partenza sono:Python: OSError: [Errno 2] Nessun file o directory di questo tipo: ''
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!)
Quando viene eseguito,
$cd /my/folder/
$python script.py
ricevo l'errore:
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: ''
Come dovrei leggere questo errore e cosa fare?
Ricevo ancora l'errore. – MontyPython