Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix download of attachments from messages with unicode subjects #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moba
Copy link

@moba moba commented Feb 23, 2019

Fixes a problem with unicode subjects in messages:

PostboxDocument(msg_date=datetime.datetime(2017, 10, 20, 10, 58), msg_type=u'Bankpostkorb', is_new=True, url=u'/ptlweb/WebPortal?frame=content...', subject=u'Bankpostkorb F\xfcr Ihr Unternehmen: AGB-\xc4n...', postbox_page=u'4')

Access postbox
Access postbox page 4
Traceback (most recent call last):
  File "fetch.py", line 43, in <module>
    scraper.download_document(document, [directory])
  File "vbscraper.py", line 229, in download_document
    print("Download document {}".format(document.subject))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 14: ordinal not in range(128)

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

Successfully merging this pull request may close these issues.

1 participant