You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the put action, we catch only FileNotFoundError. This is a subclass of OSError, but we don't catch any other subclasses that might arise, nor the parent class itself.
Solution:
Either (a) add an OSError handler after the FileNotFoundError handler or (b) if the OSError messages are clear enough, replace the FileNotFoundError handler with an OSError handler that looks something like:
except OSError as e:
print("Error:", e.strerror)
The text was updated successfully, but these errors were encountered:
How to reproduce:
foo
foo
put foo
from the clientOutput:
Cause:
In the put action, we catch only
FileNotFoundError
. This is a subclass ofOSError
, but we don't catch any other subclasses that might arise, nor the parent class itself.Solution:
Either (a) add an
OSError
handler after theFileNotFoundError
handler or (b) if theOSError
messages are clear enough, replace theFileNotFoundError
handler with anOSError
handler that looks something like:except OSError as e:
print("Error:", e.strerror)
The text was updated successfully, but these errors were encountered: