[Zope] Error Type: ExpatError
Garito
garito at sistes.net
Wed Oct 12 09:07:06 EDT 2005
Alan Milligan escribió:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Garito wrote:
>
>
>>Chris Withers escribió:
>>
>>
>>
>>>Get a packet sniffer going, looks like something is missing from the
>>>request when you hit reload!
>>>
>>>cheers,
>>>
>>>Chris
>>>
>>>Garito wrote:
>>>
>>>
>>>
>>>>Hi all
>>>>
>>>>I try to read an xml file using
>>>>from xml.dom.minidom import parseString
>>>>
>>>>It works fine but when I push the reload button raise these error
>>>>
>>>>Error Type: ExpatError
>>>>Error Value: no element found: line 1, column 0
>>>>
>>>>These error is intermittence
>>>>
>>>>These is the trace back any idea?
>>>>
>>>>Traceback (innermost last):
>>>>
>>>>Module ZPublisher.Publish, line 113, in publish
>>>>111 | missing_name,
>>>>112 | dont_publish_class,
>>>>113>| request, bind=1)
>>>>114 |
>>>>115 | if result is not response:
>>>>
>>>>Module ZPublisher.mapply, line 88, in mapply
>>>>086 |
>>>>087 | args=tuple(args)
>>>>088>| if debug is not None: return debug(object,args,context)
>>>>089 | else: return object(*args)
>>>>
>>>>Module ZPublisher.Publish, line 40, in call_object
>>>>038 |
>>>>039 |def call_object(object, args, request):
>>>>040>| result=apply(object,args) # Type s<cr> to step into
>>>>published object.
>>>>041 | return result
>>>>042 |
>>>>
>>>>Module Shared.DC.Scripts.Bindings, line 311, in __call__
>>>>309 | def __call__(self, *args, **kw):
>>>>310 | '''Calls the script.'''
>>>>311>| return self._bindAndExec(args, kw, None)
>>>>312 |
>>>>313 | def __render_with_namespace__(self, namespace):
>>>>
>>>>Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
>>>>346 | exec bindcode
>>>>347 | bound_data = bound_data[0]
>>>>348>| return self._exec(bound_data, args, kw)
>>>>349 | finally:
>>>>350 | security.removeContext(self)
>>>>
>>>>Module Products.PythonScripts.PythonScript, line 323, in _exec
>>>>321 | f = new.function(fcode, g, None, fadefs)
>>>>322 |
>>>>323>| result = f(*args, **kw)
>>>>324 | if keyset is not None:
>>>>325 | # Store the result in the cache.
>>>>
>>>>Module None, line 9, in Lanzar
>>>> - <ComandoYanged at /SitiosYanged/Huete/Web/Lanzar> - Line 9
>>>>006 |if 'Camino' not in args: args['Camino'] = traverse_subpath
>>>>007 |if 'Usuario' not in args: args['Usuario'] =
>>>>str(context.Dame('usuario'))
>>>>008>|args = context.ObtenerNodo(args)
>>>>009 |
>>>>010 |if args is None: Module Products.Yanged.SitioYanged, line 268,
>>>>in ObtenerNodo
>>>>266 | 267 | if 'NodoRaiz' not in args:
>>>>268>| args['NodoRaiz'] = parseString(self.Dame({'nombre':
>>>>self.getId() + '.mm'}).index_html(self.REQUEST, self.REQUEST.RESPONSE))
>>>>269 | if 'Nodos' not in args: args['Nodos'] =
>>>>args['NodoRaiz'].childNodes
>>>>270 | if 'Nivel' not in args: args['Nivel'] = 0
>>>>
>>>>Module xml.dom.minidom, line 1929, in parseString
>>>>1927 | if parser is None:
>>>>1928 | from xml.dom import expatbuilder
>>>>1929>| return expatbuilder.parseString(string)
>>>>1930 | else:
>>>>1931 | from xml.dom import pulldom
>>>>
>>>>Module xml.dom.expatbuilder, line 940, in parseString
>>>>938 | else:
>>>>939 | builder = ExpatBuilder()
>>>>940>| return builder.parseString(string)
>>>>941 |
>>>>942 |
>>>>
>>>>Module xml.dom.expatbuilder, line 223, in parseString
>>>>221 | parser = self.getParser()
>>>>222 | try:
>>>>223>| parser.Parse(string, True)
>>>>224 | self._setup_subset(string)
>>>>225 | except ParseEscape:
>>>>ExpatError: no element found: line 1, column 0
>>>>
>>>>
>>>>
>>>>Thanks!
>>>>
>>>>
>>>>
>>Hi Chris!
>>Could you be a little more concrete?
>>
>>Thanks!
>>
>>
>>
>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.
>
>ALan
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.6 (GNU/Linux)
>Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
>iD8DBQFDTQhkCfroLk4EZpkRAjklAJ9VBl9jjzKvRBr9gN3mcGYePpxYSACgtZkZ
>h/hu5V2gGxxKSp8JUk1WpIw=
>=b7+S
>-----END PGP SIGNATURE-----
>
>
Buff! Complicate
There are any out-of-the-box solution on Zope?
I mean: there are any other xml library on a standard Zope installation?
Thanks!
--
Mis Cosas
http://blogs.sistes.net/Garito/
More information about the Zope
mailing list