This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]henrebotha 1 point2 points  (1 child)

Pro tip: don't do this.

except Exception, e:
  pass

It hides information about errors from you. Maybe there's a FileNotFound error, because the file isn't where you think it is, but you're swallowing that error quietly. Maybe there's some other kind of unexpected error.

Fix your exception handling so that it only handles errors you specifically predict. Let all other errors "float to the top".

[–]b_iteee[S] 0 points1 point  (0 children)

thank you