Skip to content

UnicodeEncodeError on export #1

@mtrebron

Description

@mtrebron

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions