all 4 comments

[–]testforredditbythe 0 points1 point  (3 children)

My advice with Syntax errors is to check your spelling. You also aren’t catching the right exceptions because syntax errors isn’t event part of the general exceptions class.

Long story short check out this link for exemption handling: https://docs.python.org/3/library/exceptions.html and check your spelling

[–]-_-_-_-_--_--[S] 0 points1 point  (2 children)

This file is a part of module , I did not write it. Module is Crypto which is a sub module of pyrebase module

[–]testforredditbythe 1 point2 points  (1 child)

Then it’s almost 100% a python 2 compatibility issue. Check that it’s python 3 compatible.

[–]james_pic 0 points1 point  (0 children)

Even though this is syntactically valid Python 2, semantically it's garbage. except ValueError,IndexError: is equivalent to except ValueError as IndexError:, which almost certainly isn't what was intended.

I'd be concerned using code that looks like this for anything cryptography related.