Activity log for bug #716038

Date Who What changed Old value New value Message
2011-02-09 19:44:24 Roman Jansen-Winkeln bug added bug
2011-02-09 19:44:24 Roman Jansen-Winkeln attachment added Fixed Workflow export. The relevant files are "workflows/kiid_publication_workflow/definition.xml and .../scripts https://bugs.launchpad.net/bugs/716038/+attachment/1840280/+files/setup_tool-20110209162415.tar.gz
2011-02-09 19:48:59 Roman Jansen-Winkeln description We stumbled in problems with broken TAR-Exports from GenericSetup exports of DCWorkflows. The reason: oour interactively defined Workflows contained Non-Ascii Unicode Characters. Python operates in "utf-8" mode. For the enclosed example file "definitions.xml", the method "writeDataFile" in class "TarballExportContext" in file "context.py" of Products.GenerictSetup-1.6.1 reports in "info.size = len( text )" a length of 8300 characters. The real length of the file is however 8324 bytes, which is len(str(text)). The relevant workflow in the attached (fixed) export is We have developped a simple workaround and replaced the original: stream = StringIO( text ) info = TarInfo( filename ) info.size = len( text ) with text = str(text) ### Patch to convert unicode to bytes [RJW 2011-02-09] stream = StringIO( text ) info = TarInfo( filename ) info.size = len( text ) # len is wrong for utf-8 encoding It works fine for our purposes. There may surely be a more elegant solution. The bug appears in Plone 3.3.x and in Plone 4.0.x Best Regards roman We stumbled in problems with broken TAR-Exports from GenericSetup exports of DCWorkflows. The reason: our interactively defined workflows contained non-ascii unicode characters. For the enclosed example file "definitions.xml", the method "writeDataFile" in class "TarballExportContext" in file "context.py" of Products.GenerictSetup-1.6.1 reports in "info.size = len( text )" a length of 8300 characters. The real length of the file is however 8324 bytes, which is len(str(text)). The relevant workflow in the attached (fixed) export is We have developped a simple workaround and replaced the original:         stream = StringIO( text )         info = TarInfo( filename )         info.size = len( text ) with         text = str(text) ### Patch to convert unicode to bytes [RJW 2011-02-09]         stream = StringIO( text )         info = TarInfo( filename )         info.size = len( text ) # len is wrong for utf-8 encoding It works fine for our purposes. There may surely be a more elegant solution. The bug appears in Plone 3.3.x and in Plone 4.0.x . Python operates in "utf-8" mode. Best Regards roman
2012-08-10 16:54:44 Tres Seaver zope-cmf: status New Fix Released