Re: Python 3.5 issue - SystemError: <built-in function xmlReadFile> returned a result with an error set

Stefan Behnel <[email protected]>
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
Petr Sumbera schrieb am 30.08.2017 um 14:00:
> anyone seen following error when running Python regression tests? This is
> just with Python 3.5. Pythons 2.7 and 3.4 are ok (I haven't tested Python
> 3.6).
> 
> ## running Python regression tests
> TypeError: 'NoneType' object is not callable
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File
> "/builds/psumbera/userland-libxml2-2.9.5/components/libxml2/libxml2-2.9.5/python/tests/tstLastError.py",
> line 80, in <module>
>     test.test1()
>   File
> "/builds/psumbera/userland-libxml2-2.9.5/components/libxml2/libxml2-2.9.5/python/tests/tstLastError.py",
> line 62, in test1
>     line=0)
>   File
> "/builds/psumbera/userland-libxml2-2.9.5/components/libxml2/libxml2-2.9.5/python/tests/tstLastError.py",
> line 30, in failUnlessXmlError
>     f(*args)
>   File
> "/builds/psumbera/userland-libxml2-2.9.5/components/libxml2/libxml2-2.9.5/python/libxml2.py",
> line 1374, in readFile
>     ret = libxml2mod.xmlReadFile(filename, encoding, options)
> SystemError: <built-in function xmlReadFile> returned a result with an
> error set
> -- tstLastError.py

What this error means is that a Python exception was raised and not
handled, and when returning from the Python function call to the
C-implemented function, it returned an actual result value instead of
returning NULL in order to propagate the exception. This is a bug in the C
extension. It should either silence and clear the exception explicitly with
PyErr_Clear(), or propagate it.

Stefan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.