collective / collective/collective.importexport
UnicodeEncodeError on export
- Dominant language
- Python
- Stars
- 2
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
While trying to export text fields, I get:
`Traceback (innermost last):
```
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.z3cform.layout, line 66, in __call__
Module plone.z3cform.layout, line 50, in update
Module plone.z3cform.fieldsets.extensible, line 59, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 145, in update
Module plone.app.z3cform.csrf, line 21, in execute
Module z3c.form.action, line 98, in execute
Module z3c.form.button, line 315, in __call__
Module z3c.form.button, line 170, in __call__
Module collective.importexport.browser.import_view, line 675, in handleExport
Module collective.importexport.browser.import_view, line 267, in export_file`
```
`UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 3: ordinal not in range(128)`
This can be solved by inserting a new line 264 in collective.importexport.browser.import_view:
`value = value and value.encode('utf-8')`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in collective.importexport.browser.import_view at export_file around line 267, following the traceback from handleExport. Reproduce the export with text containing Ö and verify that the resulting CSV handles the character without UnicodeEncodeError. Done means the export succeeds with non-ASCII text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100