simple-crypt
simple-crypt copied to clipboard
Multiple exception types must be parenthesized error
When I run import simplecrypt
in my python file. It encounters an error saying:
File "/home/codespace/.python/current/lib/python3.10/site-packages/simplecrypt/__init__.py", line 5, in <module>
from Crypto.Random.random import getrandbits
File "/home/codespace/.python/current/lib/python3.10/site-packages/Crypto/Random/__init__.py", line 28, in <module>
from Crypto.Random import OSRNG
File "/home/codespace/.python/current/lib/python3.10/site-packages/Crypto/Random/OSRNG/__init__.py", line 32, in <module>
from Crypto.Random.OSRNG.posix import new
File "/home/codespace/.python/current/lib/python3.10/site-packages/Crypto/Random/OSRNG/posix.py", line 66
except IOError, e:
^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
Any help would be appreciated 👍🏻
same here
Any answers on this?
Same here. It seems to be an issue with python 3.10.
Workaround:
- If your application can handle it, downgrade to python 3.9.
-
pip install simple-crypt
- If you still get an error like this one, uninstall PyCrypto (dead) and install PyCryptodome (its living fork) as it says there:
pip uninstall PyCrypto; pip install -U PyCryptodome
- Then it worked