I keep getting this error but cant find any helpful information on it. i am not storing it in a file but instead storing it in the decryption code so that no one can see it once it is compiled (if there is a better way of storing the key let me know please).
here is the error
get_data = ast.literal_eval(Fernet(Key).decrypt((Message).encode('utf-8')).decode('utf-8'))
File "C:\Program Files\Python37\lib\site-packages\cryptography\fernet.py", line 38, in __init__
"Fernet key must be 32 url-safe base64-encoded bytes."
ValueError: Fernet key must be 32 url-safe base64-encoded bytes.
here is my section of code
Key = b'pT8ZDjwCvnWkfPEYBm12q2p9srNkM-nWC6Ss9aAcMEw='
i made the code a bit easier to read
message_to_decrypt = (message_to_decrypt).encode('utf-8')
ast.literal_eval(Fernet(Key).decrypt(message_to_decrypt ).decode('utf-8'))