Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Error on tm.get_mailbox(email) #6

Open
ghost opened this issue Aug 10, 2015 · 1 comment
Open

Error on tm.get_mailbox(email) #6

ghost opened this issue Aug 10, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 10, 2015

Traceback (most recent call last):
  File "/Users/myusername/Dropbox/Python/Projects/RCGspam/main.py", line 32, in <module>
    mailbox = tm.get_mailbox(email)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tempmail.py", line 92, in get_mailbox
    email_hash = self.get_hash(email)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tempmail.py", line 79, in get_hash
    return md5(email).hexdigest()
TypeError: Unicode-objects must be encoded before hashing
@mak1001
Copy link

mak1001 commented Dec 6, 2016

Edit tempmail.py:
find get_hash function
change
return md5(email).hexdigest()
to
return md5(email.encode('utf-8')).hexdigest()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant