dimanche 1 juin 2014

Can't figure out UnboundLocalError in Python


Vote count:

0




The code block, embedded in a function:



try:
os.makedirs(os.path.dirname(log))
except OSError:
pass


The error:



UnboundLocalError: local variable 'OSError' referenced before assignment


What could this possibly be a symptom of?



asked 11 secs ago






Aucun commentaire:

Enregistrer un commentaire