In 3.3.2 The following seems to create an infinite loop:
etree.__version__ u'3.3.2' etree.Element ('a', nm = None) ^C KeyboardInterrupt
While the same in 3.2.3 produced an error:
etree.__version__ u'3.2.1'
etree.Element('a', nm= None)
TypeError Traceback (most recent call last) /home/kgk/work/bisque/bq5-stable/<ipython console> in <module>() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree.Element (src/lxml/lxml.etree.c:61442)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._makeElement (src/lxml/lxml.etree.c:13860)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._makeElement (src/lxml/lxml.etree.c:13732)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:15399)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._utf8 (src/lxml/lxml.etree.c:24676)() TypeError: Argument must be bytes or unicode, got 'NoneType' I
kris kvilekval, 28.02.2014 21:48:
In 3.3.2
The following seems to create an infinite loop:
etree.__version__ u'3.3.2' etree.Element ('a', nm = None) ^C KeyboardInterrupt
While the same in 3.2.3 produced an error:
etree.__version__ u'3.2.1'
etree.Element('a', nm= None)
TypeError Traceback (most recent call last) /home/kgk/work/bisque/bq5-stable/<ipython console> in <module>() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree.Element (src/lxml/lxml.etree.c:61442)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._makeElement (src/lxml/lxml.etree.c:13860)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._makeElement (src/lxml/lxml.etree.c:13732)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:15399)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._utf8 (src/lxml/lxml.etree.c:24676)() TypeError: Argument must be bytes or unicode, got 'NoneType'
Works for me: Python 2.7.5+ (default, Sep 19 2013, 13:48:49) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import lxml.etree as et et.Element ('a', nm = None) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "lxml.etree.pyx", line 2844, in lxml.etree.Element (src/lxml/lxml.etree.c:66174) File "apihelpers.pxi", line 133, in lxml.etree._makeElement (src/lxml/lxml.etree.c:14862) File "apihelpers.pxi", line 121, in lxml.etree._makeElement (src/lxml/lxml.etree.c:14741) File "apihelpers.pxi", line 268, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:16289) File "apihelpers.pxi", line 290, in lxml.etree._addAttributeToNode (src/lxml/lxml.etree.c:16694) File "apihelpers.pxi", line 1393, in lxml.etree._utf8 (src/lxml/lxml.etree.c:26453) TypeError: Argument must be bytes or unicode, got 'NoneType'
Could you provide your other version details? Python? libxml2? http://lxml.de/FAQ.html#i-think-i-have-found-a-bug-in-lxml-what-should-i-do Stefan
Sorry for the noise.. it's ipython Also it eventually returns, it just takes forever. Something to do with the exception lookups. I am using debian wheezy with a python 2.6 virtualenv: Python : (2, 6, 8, 'final', 0) lxml.etree : (3, 3, 2, 0) libxml used : (2, 8, 0) libxml compiled : (2, 8, 0) libxslt used : (1, 1, 26) libxslt compiled : (1, 1, 26) $ ipython Python 2.6.8 (unknown, Jan 26 2013, 14:35:25) Type "copyright", "credits" or "license" for more information. On Fri, 2014-02-28 at 22:20 +0100, Stefan Behnel wrote:
kris kvilekval, 28.02.2014 21:48:
In 3.3.2
The following seems to create an infinite loop:
etree.__version__ u'3.3.2' etree.Element ('a', nm = None) ^C KeyboardInterrupt
While the same in 3.2.3 produced an error:
etree.__version__ u'3.2.1'
etree.Element('a', nm= None)
TypeError Traceback (most recent call last) /home/kgk/work/bisque/bq5-stable/<ipython console> in <module>() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree.Element (src/lxml/lxml.etree.c:61442)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._makeElement (src/lxml/lxml.etree.c:13860)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._makeElement (src/lxml/lxml.etree.c:13732)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:15399)() /home/kgk/work/bisque/bq5-stable/bqenv/local/lib/python2.7/site-packages/lxml-3.2.1-py2.7-linux-x86_64.egg/lxml/etree.so in lxml.etree._utf8 (src/lxml/lxml.etree.c:24676)() TypeError: Argument must be bytes or unicode, got 'NoneType'
Works for me:
Python 2.7.5+ (default, Sep 19 2013, 13:48:49) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import lxml.etree as et et.Element ('a', nm = None) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "lxml.etree.pyx", line 2844, in lxml.etree.Element (src/lxml/lxml.etree.c:66174) File "apihelpers.pxi", line 133, in lxml.etree._makeElement (src/lxml/lxml.etree.c:14862) File "apihelpers.pxi", line 121, in lxml.etree._makeElement (src/lxml/lxml.etree.c:14741) File "apihelpers.pxi", line 268, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:16289) File "apihelpers.pxi", line 290, in lxml.etree._addAttributeToNode (src/lxml/lxml.etree.c:16694) File "apihelpers.pxi", line 1393, in lxml.etree._utf8 (src/lxml/lxml.etree.c:26453) TypeError: Argument must be bytes or unicode, got 'NoneType'
Could you provide your other version details? Python? libxml2?
http://lxml.de/FAQ.html#i-think-i-have-found-a-bug-in-lxml-what-should-i-do
Stefan
_________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
participants (2)
-
kris kvilekval -
Stefan Behnel