[Zope] Error Type: ExpatError

Garito garito at sistes.net
Wed Oct 12 13:52:52 EDT 2005


Fred Drake escribió:

>On 10/12/05, Garito <garito at sistes.net> wrote:
>  
>
>>Alan Milligan escribió:
>>    
>>
>>>You do realise that pyexpat has a limitation of 8192 bytes between xml
>>>tags - if your parse string is longer than this, it will fail.  You can
>>>recompile your expat parser to accept larger sizes, but this drastically
>>>affects performance.
>>>      
>>>
>
>Ok, I don't know just where this assertion comes from; I can't
>reproduce this at all with the pyexpat in Python 2.3.5 or 2.4.2.  I've
>attached a short test program that verifies pyexpat's behavior.
>
>
>  -Fred
>
>--
>Fred L. Drake, Jr.    <fdrake at gmail.com>
>"Society attacks early, when the individual is helpless." --B.F. Skinner
>  
>
>------------------------------------------------------------------------
>
>"""Test asserted size limitation of text between tags for pyexpat.
>
>"""
>__docformat__ = "reStructuredText"
>
>from xml.parsers import expat
>
>COUNT = 8192 * 10
>SAMPLE_TEXT = "<doc>abc" + ("-" * COUNT) + "xyz</doc>"
>
>
>buffer = []
>
>def characters(text):
>    buffer.append(text)
>
>p = expat.ParserCreate()
>p.CharacterDataHandler = characters
>p.Parse(SAMPLE_TEXT, True)
>
>text = u"".join(buffer)
>
>assert len(text) == (COUNT + 6)
>assert text.startswith(u"abc---")
>assert text.endswith(u"---xyz")
>
># This is expected to print "abc--- ---xyz"
>print text[:6], text[-6:]
>  
>
I run your test but no error was raised

I attach an xml file like I use and who raise the error, perhaps these 
could help to reproduce the error

This file is generated by freemind 
(http://freemind.sourceforge.net/wiki/index.php/Main_Page)

Thank you very much for your help

-- 
Mis Cosas
http://blogs.sistes.net/Garito/

-------------- next part --------------
<map version="0.8.0">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1127700855755" ID="Freemind_Link_1311124656" MODIFIED="1129138598866" TEXT="Test">
<node CREATED="1127700855755" ID="Freemind_Link_1056252011" MODIFIED="1129138606557" POSITION="right" TEXT="Node1">
<node CREATED="1127700855755" ID="Freemind_Link_1585447361" MODIFIED="1129138629570" TEXT="Node1.1">
<node CREATED="1127700855755" ID="Freemind_Link_1321508146" MODIFIED="1129138650650" TEXT="Node1.1.1">
<node CREATED="1127700855755" ID="Freemind_Link_1478499906" MODIFIED="1129138667264" TEXT="Node1.1.1.1"/>
<node CREATED="1127700855755" ID="Freemind_Link_1451771679" MODIFIED="1129138674545" TEXT="Node1.1.1.2"/>
<node CREATED="1127700855755" ID="Freemind_Link_13209311" MODIFIED="1129138681425" TEXT="Node1.1.1.3"/>
<node CREATED="1127700855755" ID="Freemind_Link_784046441" MODIFIED="1129138688174" TEXT="Node1.1.1.4"/>
<node CREATED="1127700855755" ID="Freemind_Link_595413957" MODIFIED="1129138699571" TEXT="Node1.1.1.5"/>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_1923488184" MODIFIED="1129138656489" TEXT="Node1.1.2">
<node CREATED="1127700855755" ID="Freemind_Link_582825078" MODIFIED="1129138662127" TEXT="Node1.1.2.1"/>
</node>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_1828131178" MODIFIED="1129138635298" TEXT="Node1.2">
<node CREATED="1127700855755" ID="_Freemind_Link_420363894" MODIFIED="1129138707943" TEXT="Node1.2.1">
<node CREATED="1127700855755" ID="Freemind_Link_707858988" MODIFIED="1129138713451" TEXT="Node1.2.1.1">
<node CREATED="1127700855755" ID="Freemind_Link_1900443373" MODIFIED="1129138718748" TEXT="Node1.2.1.1.1">
<node CREATED="1127700855755" ID="Freemind_Link_1378528701" MODIFIED="1129138726009" TEXT="Node1.2.1.1.1.1">
<node CREATED="1127700855755" ID="Freemind_Link_363886592" MODIFIED="1129138732638" TEXT="Node1.2.1.1.1.1.1"/>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_321491817" MODIFIED="1129138744676" TEXT="Node1.2.1.1.1.2">
<node CREATED="1127700855755" ID="Freemind_Link_1267999854" MODIFIED="1129138754279" TEXT="Node1.2.1.1.1.2.1"/>
</node>
</node>
</node>
</node>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_1592123298" MODIFIED="1129138638793" TEXT="Node1.3">
<node CREATED="1127700855755" ID="Freemind_Link_1263544703" MODIFIED="1129138759637" TEXT="Node1.3.1"/>
<node CREATED="1127700855755" ID="_Freemind_Link_1840865317" MODIFIED="1129138763353" TEXT="Node1.3.2">
<node CREATED="1127700855755" ID="Freemind_Link_676620919" MODIFIED="1129138776261" TEXT="Node1.3.2.1">
<node CREATED="1127700855755" ID="Freemind_Link_1963460314" MODIFIED="1129138784303" TEXT="Node1.3.2.1.1"/>
<node CREATED="1127700855755" ID="Freemind_Link_373718992" MODIFIED="1129138790361" TEXT="Node1.3.2.1.2"/>
</node>
</node>
</node>
<node CREATED="1127700855755" ID="_Freemind_Link_1084655594" MODIFIED="1129138642999" TEXT="Node1.4">
<node CREATED="1127700855755" ID="Freemind_Link_134129536" MODIFIED="1129138799595" TEXT="Node1.4.1">
<node CREATED="1127700855755" ID="Freemind_Link_1320959236" MODIFIED="1129138813084" TEXT="Node1.4.1.1">
<node CREATED="1127700855755" ID="Freemind_Link_207980543" MODIFIED="1129138818402" TEXT="Node1.4.1.1.1">
<node CREATED="1127700855755" ID="Freemind_Link_1524296389" MODIFIED="1129138823028" TEXT="Node1.4.1.1.1"/>
</node>
</node>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_1434191936" MODIFIED="1129138805423" TEXT="Node1.4.2">
<node CREATED="1127700855755" ID="Freemind_Link_1227127130" MODIFIED="1129138831110" TEXT="Node1.4.2.1"/>
</node>
</node>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_587511489" MODIFIED="1129138612055" POSITION="right" TEXT="Node2">
<node CREATED="1127700855755" ID="Freemind_Link_380202966" MODIFIED="1129138839202" TEXT="Node2.1">
<node CREATED="1127700855755" ID="Freemind_Link_1519466307" MODIFIED="1129138874552" TEXT="Node2.1.1">
<arrowlink DESTINATION="_Freemind_Link_420363894" ENDARROW="Default" ENDINCLINATION="30;0;" STARTARROW="None" STARTINCLINATION="158;0;"/>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_52315071" MODIFIED="1129138878037" TEXT="Node2.1.2">
<node CREATED="1127700855755" ID="Freemind_Link_624206406" MODIFIED="1129138882274" TEXT="Node2.1.2.1">
<node CREATED="1127700855755" ID="Freemind_Link_499409161" MODIFIED="1129138886880" TEXT="Node2.1.2.1.1"/>
<node CREATED="1127700855755" ID="Freemind_Link_1717655698" MODIFIED="1129138890906" TEXT="Node2.1.2.1.2"/>
</node>
</node>
</node>
<node CREATED="1127700855755" ID="Freemind_Link_28128415" MODIFIED="1129138842677" TEXT="Node2.2">
<node CREATED="1127700855765" ID="Freemind_Link_1447905037" MODIFIED="1129138894932" TEXT="Node2.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_444377933" MODIFIED="1129138910524" TEXT="Node2.2.1.1">
<node CREATED="1127700855765" ID="Freemind_Link_207447694" MODIFIED="1129138914710" TEXT="Node2.2.1.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_1736436675" MODIFIED="1129138919197" TEXT="Node2.2.1.1.2"/>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_148281120" MODIFIED="1129138898667" TEXT="Node2.2.2">
<arrowlink DESTINATION="_Freemind_Link_1840865317" ENDARROW="Default" ENDINCLINATION="30;0;" ID="Freemind_Arrow_Link_114618186" STARTARROW="None" STARTINCLINATION="250;0;"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_1990923736" MODIFIED="1129138901772" TEXT="Node2.2.3">
<node CREATED="1127700855765" ID="Freemind_Link_214296858" MODIFIED="1129138924715" TEXT="Node2.2.3.1">
<node CREATED="1127700855765" ID="Freemind_Link_28300119" MODIFIED="1129138929231" TEXT="Node2.2.3.1.1"/>
</node>
</node>
<node CREATED="1128794134455" ID="Freemind_Link_1933681936" MODIFIED="1129138905367" TEXT="Node2.2.4"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_1485210644" MODIFIED="1129138846592" TEXT="Node2.3">
<arrowlink DESTINATION="_Freemind_Link_1084655594" ENDARROW="Default" ENDINCLINATION="78;0;" ID="Freemind_Arrow_Link_1479040095" STARTARROW="None" STARTINCLINATION="78;0;"/>
</node>
<node CREATED="1127700855765" ID="_" MODIFIED="1129138850368" TEXT="Node2.4">
<node CREATED="1127700855765" ID="Freemind_Link_1732955010" MODIFIED="1129138935380" TEXT="Node2.4.1">
<node CREATED="1127700855765" ID="_Freemind_Link_938990151" MODIFIED="1129138939646" TEXT="Node2.4.1.1">
<node CREATED="1127700855765" ID="Freemind_Link_551125776" MODIFIED="1129138950812" TEXT="Node2.4.1.1.1"/>
<node CREATED="1128258548326" ID="Freemind_Link_1459625461" MODIFIED="1129138957682" TEXT="Node2.4.1.1.2">
<node CREATED="1127700855765" ID="Freemind_Link_1192637795" MODIFIED="1129138965223" TEXT="Node2.4.1.1.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_1258688746" MODIFIED="1129138972934" TEXT="Node2.4.1.1.2.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_1001888929" MODIFIED="1129138982488" TEXT="Node2.4.1.1.2.1.2"/>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_137046591" MODIFIED="1129138943982" TEXT="Node2.4.1.2">
<node CREATED="1127700855765" ID="Freemind_Link_416906073" MODIFIED="1129138988757" TEXT="Node2.4.1.2.1"/>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_1454724481" MODIFIED="1129138854033" TEXT="Node2.5">
<node CREATED="1127700855765" ID="Freemind_Link_1114446407" MODIFIED="1129138996478" TEXT="Node2.5.1">
<node CREATED="1127700855765" ID="Freemind_Link_389197049" MODIFIED="1129139005641" TEXT="Node2.5.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_625324330" MODIFIED="1129139009717" TEXT="Node2.5.1.2"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_1776242200" MODIFIED="1129139000724" TEXT="Node2.5.2">
<node CREATED="1127700855765" ID="Freemind_Link_645032945" MODIFIED="1129139014424" TEXT="Node2.5.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_749571563" MODIFIED="1129139029225" TEXT="Node2.5.2.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_478504456" MODIFIED="1129139037066" TEXT="Node2.5.2.1.2"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_179153787" MODIFIED="1129139017919" TEXT="Node2.5.2.2">
<node CREATED="1127700855765" ID="Freemind_Link_32069855" MODIFIED="1129139042915" TEXT="Node2.5.2.2.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_1000769487" MODIFIED="1129139048583" TEXT="Node2.5.2.2.2"/>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_463575380" MODIFIED="1129138858890" TEXT="Node2.6">
<node CREATED="1127700855765" ID="Freemind_Link_777217949" MODIFIED="1129139057335" TEXT="Node2.6.1">
<node CREATED="1127700855765" ID="Freemind_Link_1029754641" MODIFIED="1129139062372" TEXT="Node2.6.1.1">
<node CREATED="1128440042190" ID="Freemind_Link_542223781" MODIFIED="1129139071956" TEXT="Node2.6.1.1.1">
<node CREATED="1128440047197" ID="Freemind_Link_1287022072" MODIFIED="1129139085245" TEXT="Node2.6.1.1.1.1">
<node CREATED="1128440052285" ID="Freemind_Link_890769578" MODIFIED="1129139098404" TEXT="Node2.6.1.1.1.1.1"/>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_275012817" MODIFIED="1129139077715" TEXT="Node2.6.1.1.2">
<node CREATED="1127700855765" ID="Freemind_Link_303345195" MODIFIED="1129139092826" TEXT="Node2.6.1.1.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_1708953450" MODIFIED="1129139105444" TEXT="Node2.6.1.1.2.1.1"/>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_509117294" MODIFIED="1129139067149" TEXT="Node2.6.1.2">
<node CREATED="1127700855765" ID="Freemind_Link_862243141" MODIFIED="1129139110872" TEXT="Node2.6.1.2.1"/>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_921806818" MODIFIED="1129138863476" TEXT="Node2.7">
<node CREATED="1127700855765" ID="Freemind_Link_1029067650" MODIFIED="1129139115829" TEXT="Node2.7.1">
<node CREATED="1127700855765" ID="Freemind_Link_557558064" MODIFIED="1129139126274" TEXT="Node2.7.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_1887731570" MODIFIED="1129139132814" TEXT="Node2.7.1.2"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_528358958" MODIFIED="1129139120105" TEXT="Node2.7.2">
<node CREATED="1127700855765" ID="Freemind_Link_96143111" MODIFIED="1129139141306" TEXT="Node2.7.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_888350699" MODIFIED="1129139148406" TEXT="Node2.7.2.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_725270976" MODIFIED="1129139153504" TEXT="Node2.7.2.1.2">
<node CREATED="1127700855765" ID="Freemind_Link_1298683237" MODIFIED="1129139174504" TEXT="Node2.7.2.1.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_1081165672" MODIFIED="1129139186120" TEXT="Node2.7.2.1.2.1.1">
<node CREATED="1127700855765" ID="Freemind_Link_1384084968" MODIFIED="1129139210455" TEXT="Node2.7.2.1.2.1.1.1">
<font NAME="SansSerif" SIZE="12"/>
<node CREATED="1127700855765" ID="Freemind_Link_51760877" MODIFIED="1129139215683" TEXT="Node2.7.2.1.2.1.1.1.1"/>
</node>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_143781217" MODIFIED="1129139160263" TEXT="Node2.7.2.1.3"/>
<node CREATED="1127700855765" ID="Freemind_Link_630892562" MODIFIED="1129139166392" TEXT="Node2.7.2.1.4"/>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_811388186" MODIFIED="1129138867693" TEXT="Node2.8">
<node CREATED="1127700855765" ID="Freemind_Link_725751790" MODIFIED="1129139229252" TEXT="Node2.8.1">
<node CREATED="1127700855765" ID="Freemind_Link_927251222" MODIFIED="1129139242101" TEXT="Node2.8.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_944423632" MODIFIED="1129139246247" TEXT="Node2.8.1.2"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_423903081" MODIFIED="1129139233068" TEXT="Node2.8.2">
<node CREATED="1127700855765" ID="Freemind_Link_999604235" MODIFIED="1129139255070" TEXT="Node2.8.2.1">
<node CREATED="1127700855765" ID="Freemind_Link_1327949906" MODIFIED="1129139260968" TEXT="Node2.8.2.1.1"/>
</node>
</node>
</node>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_1276431897" MODIFIED="1129138615280" POSITION="right" TEXT="Node3">
<node CREATED="1127700855765" ID="Freemind_Link_1560059398" MODIFIED="1129139267467" TEXT="Node3.1">
<node CREATED="1127700855765" ID="Freemind_Link_208920469" MODIFIED="1129139282860" TEXT="Node3.1.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_58301751" MODIFIED="1129139286445" TEXT="Node3.1.2"/>
</node>
<node CREATED="1127700855765" HGAP="26" ID="Freemind_Link_942446024" MODIFIED="1129139270682" TEXT="Node3.2" VSHIFT="-14">
<node CREATED="1127700855765" ID="Freemind_Link_1643778652" MODIFIED="1129139289619" TEXT="Node3.2.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_1012506299" MODIFIED="1129139293014" TEXT="Node3.2.2"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_940487035" MODIFIED="1129139273536" TEXT="Node3.3">
<arrowlink DESTINATION="_" ENDARROW="Default" ENDINCLINATION="253;0;" ID="Freemind_Arrow_Link_1411283922" STARTARROW="None" STARTINCLINATION="253;0;"/>
</node>
<node CREATED="1127734168568" ID="Freemind_Link_1257538321" MODIFIED="1129139276320" TEXT="Node3.4"/>
</node>
<node CREATED="1127700855765" ID="Freemind_Link_112375466" MODIFIED="1129138619596" POSITION="left" TEXT="Node4">
<node CREATED="1127700855765" ID="Freemind_Link_1480649597" MODIFIED="1129139304941" TEXT="Node4.1"/>
<node CREATED="1127700855765" ID="Freemind_Link_782332559" MODIFIED="1129139308036" TEXT="Node4.2"/>
<node CREATED="1127700855765" ID="Freemind_Link_345625469" MODIFIED="1129139311811" TEXT="Node4.3"/>
<node CREATED="1127700855765" ID="Freemind_Link_44929897" MODIFIED="1129139316308" TEXT="Node4.4"/>
<node CREATED="1127700855765" ID="Freemind_Link_1866892975" MODIFIED="1129139319532" TEXT="Node4.5"/>
<node CREATED="1127700855765" ID="Freemind_Link_1258416603" MODIFIED="1129139324259" TEXT="Node4.6"/>
</node>
</node>
</map>


More information about the Zope mailing list