You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use ImageValue i'm getting the following error:
File "/home/user/virtualenv3.5/lib/python3.5/site-packages/dbsettings/values.py", line 306, in get_db_prep_save
hashed_name = md5(six.text_type(time.time())).hexdigest() + value.name[-4:]
TypeError: Unicode-objects must be encoded before hashing
So you can see that the problem is on file dbsettings/values.py on line 306:
Hello,
I'm using Python 3.5 and Dango 1.9.
When I use
ImageValue
i'm getting the following error:So you can see that the problem is on file
dbsettings/values.py
on line 306:CAUSE
Since Python 3.0, for
hashlib.md5
you need to passbytes
instead ofstr
. You can confirm that in Python documentation:https://docs.python.org/2.7/library/hashlib.html
https://docs.python.org/3.0/library/hashlib.html
https://docs.python.org/3.1/library/hashlib.html
...
https://docs.python.org/3.5/library/hashlib.html
RESOLUTION
Replace line 306 with the following code:
Thanks for your great work.
The text was updated successfully, but these errors were encountered: