[lxml-dev] Does etree.iter() handle the refcount properly?
Hi, I just started using lxml and I ran into an odd problem. I'm using version 2.0.4-14 from the OpenSuSE repositories. import lxml.etree as etree # test.py xml = '''\ <?xml version="1.0"?> <xml/>''' for i in range(10000): et = etree.fromstring(xml) for el in et.iter(): pass $ python test.py Fatal Python error: deallocating None Aborted Is this a bug, or am I using etree.iter() incorrectly? Thanks, Andrew
Hi, Andrew Wang wrote:
I just started using lxml and I ran into an odd problem. I'm using version 2.0.4-14 from the OpenSuSE repositories.
import lxml.etree as etree
# test.py xml = '''\ <?xml version="1.0"?> <xml/>'''
for i in range(10000): et = etree.fromstring(xml) for el in et.iter(): pass
$ python test.py Fatal Python error: deallocating None Aborted
Is this a bug, or am I using etree.iter() incorrectly?
Works for me in the latest version. Stefan
On Mon, Jul 7, 2008 at 4:05 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Hi,
Andrew Wang wrote:
I just started using lxml and I ran into an odd problem. I'm using version 2.0.4-14 from the OpenSuSE repositories.
import lxml.etree as etree
# test.py xml = '''\ <?xml version="1.0"?> <xml/>'''
for i in range(10000): et = etree.fromstring(xml) for el in et.iter(): pass
$ python test.py Fatal Python error: deallocating None Aborted
Is this a bug, or am I using etree.iter() incorrectly?
Works for me in the latest version.
Stefan
Thanks for the feedback. I've tried version 2.0.7 now and I get the same error. I'm starting to suspect it's something wrong with my OpenSUSE 11.0 install, because this same code worked on lxml version 2.0.5 on a Gentoo box...I'll take my problem to the OpenSUSE bugzilla unless someone else can reproduce it. Andrew
participants (2)
-
Andrew Wang
-
Stefan Behnel