Closed davidhuser closed 8 years ago
Please try updating :) I think it should have been solved as of https://github.com/kootenpv/yagmail/commit/0c51becf76a7107b4295153c5ff41e8ecc5d2f84#diff-bd3f77edb783f45081ab58b074bee760R450
You can upgrade by using: pip install -U yagmail
Thanks for the quick response! Unfortunately it still raises the same Error.
$ pip show yagmail
---
Name: yagmail
Version: 0.5.147
Location: /usr/local/lib/python2.7/dist-packages
Requires: keyring
Is this the version with the fix?
My version includes the commit from above. Running it from the commandline is fine, the Error is raised in this line according to the error: https://github.com/kootenpv/yagmail/blob/master/yagmail/yagmail.py#L305
The last number of the version is the commit number, so you can always verify yourself :)
The line number you're "quoting" shows that there is a problem with your "from" address. Are you sure it is a string or dict and not a list (whereas you can have a list for to
, not for from
)?
Thanks! I casted the sender username to a string using str(username)
and now it works.
Was it bytes? Then I should probably make sure it checks for that as well...
It was Unicode. Tell me if you need to know something else.
print type(conf['username'))
<type 'unicode'>
I'm trying to send a mail but get the following error:
Where my code looks like this, username and password are read from a JSON file and successfully printed.