[lxml-dev] strange problem with lxml-1.1.1 and py2.5
I am running into a strange problem when using python2.5 and lxml-1.1.1. calling findall causing a non-sensical exception to be raised. I know that this code is fine; it works perfectly with python2.4. The code in my app calls findall on an Element. Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Core.py", line 175, in Service self.handles[event.requestID].HandleEvent(event) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugin.py", line 301, in HandleEvent DirectoryBacked.HandleEvent(self, event) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugin.py", line 119, in HandleEvent self.AddEntry(event.filename) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugin.py", line 109, in AddEntry self.entries[name].HandleEvent() File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugin.py", line 267, in HandleEvent self.pnode = self.__node__(xdata, self.items) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/Pkgmgr.py", line 22, in __init__ Bcfg2.Server.Plugin.INode.__init__(self, data, pdict, parent) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugin.py", line 218, in __init__ self.children.append(mytype(item, idict, self)) File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/Pkgmgr.py", line 25, in __init__ for pkg in data.findall('./Package'): File "etree.pyx", line 1164, in etree._Element.findall File "/usr/lib/python2.5/site-packages/lxml/_elementpath.py", line 193, in findall return _compile(path).findall(element) File "/usr/lib/python2.5/site-packages/lxml/_elementpath.py", line 155, in findall for node in node: File "etree.pyx", line 1446, in etree._ElementIterator.__next__ TypeError: exceptions must be strings, classes, or instances, not type I have not tried svn, though I could if it would be useful. thanks.. -nld
Hi, Narayan Desai wrote:
I am running into a strange problem when using python2.5 and lxml-1.1.1. calling findall causing a non-sensical exception to be raised. I know that this code is fine; it works perfectly with python2.4.
File "/usr/lib/python2.5/site-packages/lxml/_elementpath.py", line 155, in findall for node in node: File "etree.pyx", line 1446, in etree._ElementIterator.__next__ TypeError: exceptions must be strings, classes, or instances, not type
Quick question: did you compile it yourself or use the egg? If you compiled it, I assume you used the Pyrex version provided by lxml? (see build.txt) Stefan
Stefan Behnel <behnel_ml <at> gkec.informatik.tu-darmstadt.de> writes:
Quick question: did you compile it yourself or use the egg? If you compiled it, I assume you used the Pyrex version provided by lxml? (see build.txt)
I built it myself. This is probably the issue. I will followup if using an up-to-date pyrex does not fix the issue. Thanks for the quick response -nld
participants (2)
-
Narayan Desai
-
Stefan Behnel