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
I'm getting this error when I try to send an email with yagmail. At this point, I have my password in the code, since I am just testing it out. Here is what my code looks like, followed by the error message:
yag = yagmail.SMTP('<MYEMAILREDACTED>', '<MYPWREDACTED>') contents = ['This is the body, and here is your pwreset key:', key, 'Did that work?'] yag.send('<EMAILREDACTED>', 'TEST', contents)
error below:
Traceback (most recent call last): File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise raise value File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise raise value File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/ubuntu/workspace/crossword/crossword/views.py", line 405, in pwresetrq_post yag.send('<REDACTED>', 'TEST', contents) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 98, in send msg = self._prepare_message(addresses, subject, contents, attachments, headers) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 217, in _prepare_message has_included_images, content_objects = self._prepare_contents(contents) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 276, in _prepare_contents content_object = self._get_mime_object(content) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 343, in _get_mime_object content_name = os.path.basename(content_string) File "/usr/lib/python3.4/posixpath.py", line 139, in basename i = p.rfind(sep) + 1 AttributeError: 'UUID' object has no attribute 'rfind'
Can you help me figure out what I need to fix this? Thanks!
The text was updated successfully, but these errors were encountered:
Hello!
I'm getting this error when I try to send an email with yagmail. At this point, I have my password in the code, since I am just testing it out. Here is what my code looks like, followed by the error message:
yag = yagmail.SMTP('<MYEMAILREDACTED>', '<MYPWREDACTED>') contents = ['This is the body, and here is your pwreset key:', key, 'Did that work?'] yag.send('<EMAILREDACTED>', 'TEST', contents)
error below:
Traceback (most recent call last): File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise raise value File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise raise value File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/ubuntu/workspace/crossword/crossword/views.py", line 405, in pwresetrq_post yag.send('<REDACTED>', 'TEST', contents) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 98, in send msg = self._prepare_message(addresses, subject, contents, attachments, headers) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 217, in _prepare_message has_included_images, content_objects = self._prepare_contents(contents) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 276, in _prepare_contents content_object = self._get_mime_object(content) File "/home/ubuntu/workspace/crossword/env/lib/python3.4/site-packages/yagmail/yagmail.py", line 343, in _get_mime_object content_name = os.path.basename(content_string) File "/usr/lib/python3.4/posixpath.py", line 139, in basename i = p.rfind(sep) + 1 AttributeError: 'UUID' object has no attribute 'rfind'
Can you help me figure out what I need to fix this? Thanks!
The text was updated successfully, but these errors were encountered: