Error copying theme in Theming control panel

I am using this setup

Plone 5.2.1 (5208)
CMF 2.4.2
Zope 4.1.3
Python 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
PIL 6.2.1 (Pillow)
WSGI: On
Server: waitress 1.4.2

When I try to copy a theme in the Theming control panel I get the following error. I'm looking for hints as to the cause. Thanks :slight_smile:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 256, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 62, in call_object
  Module plone.app.theming.browser.controlpanel, line 57, in __call__
  Module plone.app.theming.browser.controlpanel, line 370, in update
  Module plone.app.theming.utils, line 517, in createThemeFromTemplate
  Module plone.resource.utils, line 99, in cloneResourceDirectory
  Module plone.resource.directory, line 91, in openFile
  Module plone.resource.directory, line 97, in readFile
IOError: u'b'

Ui, a unicode :honeybee:!

I am pretty sure I didn't enter any Unicode in the name or description of the copied theme... maybe there is in the name of one of the resources being copied. I will step through the code...

That's not a unicode error, thats the py2.7 representation of a unicode string which likely should be encoded to get bytes instead.