[ZCM] [ZC] 1219/ 5 Comment "XML export broken"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Mon May 24 10:15:09 EDT 2004
Issue #1219 Update (Comment) "XML export broken"
Status Pending, Zope/bug medium
To followup, visit:
http://zope.org/Collectors/Zope/1219
==============================================================
= Comment - Entry #5 by patros on May 24, 2004 10:14 am
added line in class Sequence(Collection) solves the bug:
def extend(self, v): self._subs.extend(v)
________________________________________
= Comment - Entry #4 by ajung on May 18, 2004 3:46 am
See also #1340
________________________________________
= Comment - Entry #3 by bkulawik on Mar 9, 2004 9:27 am
I have the same problem, and I tried the solution suggested by Clemens Robbenhaar - but unfortunately it didn't work [ even when I corrected the obvious typo at the end where self._subs.extens(v) should be - IMHO - self._subs.extend(v) ] Could anyone give a helpful solution, please?
<snip>
"The class "List" which does not has the attribute "extend"
is defined in the "ppml.py" (in lib/python/Shared/DC/xml)
Maybe You could try to add such a method to its base class "Sequence",
defined in the same file; e.g. to the class definition:
class Sequence(Collection):
def __init__(self, v=None):
if not v: v=[]
self._subs=v
def __len__(self): return len(self._subs)
def append(self, v): self._subs.append(v)
def value(self, indent):
return string.join(map(
lambda v, indent=indent: v.__str__(indent),
self._subs),'')
append something like:
def extend(self, v): self._subs.extens(v)
</snip>
________________________________________
= Comment - Entry #2 by ajung on Feb 11, 2004 2:39 am
I confirm this bug and figured out a new one:
Time 2004/02/11 08:36:31.223 GMT+1
User Name (User Id) ajung (ajung)
Request URL http://xweb3:29080/plone_trackers/manage_exportObject
Exception Type AttributeError
Exception Value 'unicode' object has no attribute 'id'
Traceback (innermost last):
* Module ZPublisher.Publish, line 112, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 47, in call_object
* Module OFS.ObjectManager, line 513, in manage_exportObject
* Module OFS.XMLExportImport, line 58, in exportXML
* Module OFS.XMLExportImport, line 33, in XMLrecord
* Module Shared.DC.xml.ppml, line 253, in load
* Module pickle, line 872, in load
* Module Shared.DC.xml.ppml, line 406, in load_binput
AttributeError: 'unicode' object has no attribute 'id'
Also Zope 2.7/HEAD + Python 2.3.3.
________________________________________
= Request - Entry #1 by jxr on Feb 6, 2004 1:20 pm
XML export is apparently broken for some objects.
Here an example on exporting a ZSQL method:
Traceback (innermost last):
Module ZPublisher.Publish, line 100, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 40, in call_object
Module OFS.ObjectManager, line 502, in manage_exportObject
Module OFS.XMLExportImport, line 58, in exportXML
Module OFS.XMLExportImport, line 33, in XMLrecord
Module Shared.DC.xml.ppml, line 253, in load
Module pickle, line 872, in load
Module pickle, line 1209, in load_appends
AttributeError: List instance has no attribute 'extend'
==============================================================
More information about the Zope-Collector-Monitor
mailing list