Bug in Content export from portal_setup in Plone 5.1.5?

Hi folks:

I've got a Plone 5.1.5 site whose structure I'm attempting to export using the Export tab on the portal_setup tool, selecting just step 8 "Content", and clicking "Export selected steps".

This ends up with a stack trace:

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 Products.GenericSetup.tool, line 645, in manage_exportSelectedSteps
  Module Products.GenericSetup.tool, line 1304, in _doRunExportSteps
  Module Products.CMFCore.exportimport.content, line 36, in exportSiteStructure
  Module Products.CMFCore.exportimport.content, line 177, in export
  Module plone.dexterity.exportimport, line 84, in export
  Module plone.dexterity.exportimport, line 84, in export
  Module plone.dexterity.exportimport, line 84, in export
  Module plone.dexterity.exportimport, line 72, in export
  Module plone.dexterity.filerepresentation, line 121, in manage_FTPget
  Module plone.dexterity.filerepresentation, line 657, in encoding
  Module plone.memoize.instance, line 53, in memogetter
  Module plone.dexterity.filerepresentation, line 675, in _getMessage
  Module plone.rfc822._utils, line 34, in constructMessageFromSchemata
  Module plone.rfc822._utils, line 66, in constructMessage
ValueError: Marshaler for field event_url did not return bytes

If I put in a breakpoint in plone.rfc822._utils and look at the value that's being tested in lines 62 through 66, it is indeed not bytes but a Unicode string, namely u'https://site.webex.com/site/j.php?MTID=m1246a5c488421372de8b4511b2.

I'll start exploring other export approaches like plone.importexport but just wanted to get this on developers' radar.

Same here - now I patched tool.py so I get some idea about my site-configuration
My patch skips step_id=content (hey, I wanted configuration ....) and just continues with the next step
if an error occurs: eg.:

ERROR GenericSetup Step plone.app.registry fails with an TypeError - lets continue

```spinatgurke:GenericSetup alex$ diff -uN tool.py-dist tool.py

--- tool.py-dist 2019-02-12 15:52:37.000000000 +0100
+++ tool.py 2019-03-22 13:53:44.000000000 +0100
@@ -417,6 +417,11 @@

     for step_id in steps:
  •        if step_id==u'content':
  •            logger = logging.getLogger('GenericSetup')
  •            logger.warning("skipping step_id=%s" % step_id )
  •            continue
  •        handler = self.getExportStep(step_id)
           if handler is None:
           @@ -424,7 +429,12 @@
               logger.error('Step %s has an invalid handler' % step_id)
  •        messages[step_id] = handler(context)
  •        try:
  •            messages[step_id] = handler(context)
  •        except TypeError:
  •            logger = logging.getLogger('GenericSetup')
  •            logger.error('Step %s fails with an TypeError - lets continue' % step_id)
  •            continue                
       return {'steps': steps,
               'messages': messages,