Python's Cryptography Throwing AttributeError: 'int' Object Has No Attribute 'value'
I'm trying to execute the following code: from cryptography.fernet import Fernet key = Fernet.generate_key() cipher_suite = Fernet(key) cipher_text = cipher_suite.encrypt(b'A reall
Solution 1:
The cryptography code needs the Python 3 enum: https://pypi.python.org/pypi/enum34 . That is why you got that issue.
I suggest to verify if your version is right and not replaced by another module as well.
Solution 2:
The issue was that I had a module named enum.py along with the cryptography code (same package). cryptography tried to use it instead of enum34. Renaming the 'enum.py' to something else solved it.
Post a Comment for "Python's Cryptography Throwing AttributeError: 'int' Object Has No Attribute 'value'"