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 UnicodeEncodeError when exporting via CSV #21

Merged
merged 2 commits into from
May 17, 2021
Merged

Conversation

ramonski
Copy link
Contributor

Description

This PR fixes a UnicodeEncodeError when exporting via CSV

Traceback

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module senaite.databox.browser.view, line 121, in export_to_csv
  Module senaite.databox.browser.view, line 163, in get_csv
UnicodeEncodeError: 'ascii' codec can't encode characters in position 14-16: ordinal not in range(128)

@ramonski ramonski changed the title Encode CSV rows to UTF8 Fix UnicodeEncodeError when exporting via CSV May 14, 2021
@xispa xispa merged commit 048053d into master May 17, 2021
@xispa xispa deleted the fix-csv-unicode-error branch May 17, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants