Error on DCWorkflow import with cmf.pt (chameleon)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope CMF buildout |
Fix Released
|
Low
|
Tres Seaver |
Bug Description
While testing cmf.pt, I had to apply the attached patch to make XML-export & import working with Products.DCWorkflow (on a Plone setup).
I think, my attachment describes the problem pretty well.
1) The first error I got, was missing encoding, which was fixed by defining encoding on the XML template.
2) The second error was caused by missing attributes on the XML. The reason is, I guess, because of the differences in Chameleon's TAL-implementation, boolean values aren't implicitly converted into strings on tal:attributes, but the attributes are just silently dropped. The attributes in question were included on the resulting XML only after I applied explicit transforms from boolen to string using TAL's inline python.
Python 2.6.4
Zope 2.12.14
Products.DCWorkflow 2.2.2
(collective.wtf appearing in tracebacks is used to import workflows described in CSV and makes this problem more apparent, because it first generates XML-export using DCWorkflow's methods and only then asks DCWorkflow to import it, thus this error doesn't appear with working XML-exports, which are hand-crafted or generated without cmf.pt)
2011-01-26 13:37:47 INFO GenericSetup.
2011-01-26 13:37:47 INFO GenericSetup.
2011-01-26 13:37:47 ERROR Zope.SiteErrorLog 1296041867.
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.
Module ZPublisher.Publish, line 47, in call_object
Module Products.
Module Products.
Module Products.
- __traceback_info__: workflow-csv
Module collective.
Module collective.
Module Products.
Module xml.dom.minidom, line 1928, in parseString
Module xml.dom.
Module xml.dom.
LookupError: unknown encoding: None
2011-01-26 13:38:55 INFO GenericSetup.
2011-01-26 13:38:55 INFO GenericSetup.
2011-01-26 13:38:55 ERROR Zope.SiteErrorLog 1296041935.
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.
Module ZPublisher.Publish, line 47, in call_object
Module Products.
Module Products.
Module Products.
- __traceback_info__: workflow-csv
Module collective.
Module collective.
Module Products.
Module Products.
Module Products.
Module xml.dom.minidom, line 530, in __getitem__
KeyError: 'acquired'
Changed in zope-cmf: | |
status: | Fix Committed → Fix Released |
Thanks for the bug report.
A couple of observations:
- xml documents are UTF-8 encoded by default. It seems as though
your generated XML must have an unknown encoding value, maybe being
generated oddly by cmf.pt.
- The missing attributes are likely missing because cmf.pt treats
'None' as a signal to omit an attribute. I don't think having the
string "None" for those attributes is the correct thing, either.
Could you please the generated (unparseable) XML being produced by
collective.wtf / DCWorkflow?