Your message dated Tue, 7 Feb 2006 15:11:21 +0100 with message-id <[EMAIL PROTECTED]> and subject line closing forgotten bug report has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message --->From [EMAIL PROTECTED] Tue Dec 07 16:11:58 2004 Received: (at submit) by bugs.debian.org; 8 Dec 2004 00:11:58 +0000 Return-path: <[EMAIL PROTECTED]> Received: from outmx015.isp.belgacom.be [195.238.2.87] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CbpQz-0004Kq-00; Tue, 07 Dec 2004 16:11:58 -0800 Received: from outmx015.isp.belgacom.be (localhost [127.0.0.1]) by outmx015.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id iB80BmP4011497 for <[EMAIL PROTECTED]>; Wed, 8 Dec 2004 01:11:48 +0100 (envelope-from <[EMAIL PROTECTED]>) Received: from nutella.nutellux.ath.cx (88.159-201-80.adsl.skynet.be [80.201.159.88]) by outmx015.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id iB80Bli2011488; Wed, 8 Dec 2004 01:11:47 +0100 (envelope-from <[EMAIL PROTECTED]>) Received: from smarties.nutellux.ath.cx ([192.168.1.148]) by nutella.nutellux.ath.cx with esmtp (Exim 4.34) id 1CbpQp-0002MR-6M; Wed, 08 Dec 2004 01:11:47 +0100 Received: from nicoe by smarties.nutellux.ath.cx with local (Exim 4.34) id 1CbpQL-0003yr-5H; Wed, 08 Dec 2004 01:11:17 +0100 Content-Type: multipart/mixed; boundary="===============0168469866==" MIME-Version: 1.0 From: =?utf-8?q?Nicolas_=C3=89vrard?= <[EMAIL PROTECTED]> To: Debian Bug Tracking System <[EMAIL PROTECTED]> Subject: python-xml: xml.xpath module raise error when using a valid xpath X-Mailer: reportbug 3.2 Date: Wed, 08 Dec 2004 01:11:17 +0100 Message-Id: <[EMAIL PROTECTED]> Sender: Nicolas Evrard <[EMAIL PROTECTED]> Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2004_03_25 X-Spam-Level: This is a multi-part MIME message sent by reportbug. --===============0168469866== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Package: python-xml Version: 0.8.3-5 Severity: normal Tags: patch Hello, Using this xpath: '//[EMAIL PROTECTED]"topartists"]/child::tr[position()<11]/descendant::a' on this page: http://www.audioscrobbler.com/user/nicoe/ raise an exception: Traceback (most recent call last): File "artistlist.py", line 35, in ? print ar.top10 File "artistlist.py", line 26, in _getTop10 self._update() File "artistlist.py", line 20, in _update self._top10 = [(a.childNodes[0].data, File "/usr/lib/python2.3/site-packages/_xmlplus/xpath/__init__.py", line 70, in Evaluate retval = parser.new().parse(expr).evaluate(con) File "/usr/lib/python2.3/site-packages/_xmlplus/xpath/ParsedAbbreviatedAbsoluteLocationPath.py", line 44, in evaluate sub_rt.extend(self._rel.select(context)) File "/usr/lib/python2.3/site-packages/_xmlplus/xpath/ParsedRelativeLocationPath.py", line 21, in evaluate rt = self._left.select(context) File "/usr/lib/python2.3/site-packages/_xmlplus/xpath/ParsedRelativeLocationPath.py", line 23, in evaluate raise Exception("Expected node set from relative expression. Got %s"%str(rt)) Exception: Expected node set from relative expression. Got () This happens because Text Node created when parsing the tree return an empty tuple as childNodes. The way I fixed this bug was by making EmptyNodeList inheriting from list instead from tuple. Another way to fix this would be to accept tuple and list in 'evaluate'. I don't know which way is the most effective. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-1-k7 Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8) Versions of packages python-xml depends on: ii python 2.3.4-4 An interactive high-level object-o ii python2.3-xml 0.8.3-5 XML tools for Python (2.3.x) -- no debconf information --===============0168469866== Content-Type: text/x-c++; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="minicompat.patch" --- /usr/lib/python2.3/xml/dom/minicompat.py 2004-09-24 08:57:58.000000000 +0200 +++ /usr/lib/python2.3/site-packages/_xmlplus/dom/minicompat.py 2004-12-08 00:47:20.000000000 +0100 @@ -112,7 +112,7 @@ def __setstate__(self, state): self[:] = state - class EmptyNodeList(tuple): + class EmptyNodeList(list): __slots__ = () def __add__(self, other): --===============0168469866== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xpath.patch" --- /usr/lib/python2.3/site-packages/_xmlplus/xpath/ParsedRelativeLocationPath.py 2003-03-11 15:01:36.000000000 +0100 +++ /home/nicoe/ParsedRelativeLocationPath.py 2004-12-08 01:09:43.000000000 +0100 @@ -19,7 +19,7 @@ def evaluate(self, context): rt = self._left.select(context) - if type(rt) != type([]): + if isinstance(rst, type(())) or isinstance(rst, type([])): raise Exception("Expected node set from relative expression. Got %s"%str(rt)) origState = context.copyNodePosSize() --===============0168469866==--
--- End Message ---
--- Begin Message --->From [EMAIL PROTECTED] Tue Feb 07 06:11:58 2006 Received: (at 284686-done) by bugs.debian.org; 7 Feb 2006 14:11:58 +0000 Return-path: <[EMAIL PROTECTED]> Received: from logilab.net2.nerim.net ([62.4.19.137] helo=tucana.logilab.fr) by spohr.debian.org with esmtp (Exim 4.50) id 1F6TZW-0006tv-7a for [EMAIL PROTECTED]; Tue, 07 Feb 2006 06:11:58 -0800 Received: from orion.logilab.fr (scutum.logilab.fr [172.17.0.2]) by tucana.logilab.fr (Postfix) with ESMTP id 6A1F27140A4 for <[EMAIL PROTECTED]>; Tue, 7 Feb 2006 15:11:21 +0100 (CET) Received: from logilab.fr (sagittarius.logilab.fr [172.17.1.68]) by orion.logilab.fr (Postfix) with SMTP id 726CA2BC16 for <[EMAIL PROTECTED]>; Tue, 7 Feb 2006 15:11:21 +0100 (CET) Received: (nullmailer pid 5135 invoked by uid 1002); Tue, 07 Feb 2006 14:11:21 -0000 Date: Tue, 7 Feb 2006 15:11:21 +0100 From: Alexandre Fayolle <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: closing forgotten bug report Message-ID: <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="t4apE7yKrX2dGgJC" Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060126 X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Level: X-Spam-Status: No, hits=-0.5 required=4.0 tests=BAYES_30 autolearn=no version=2.60-bugs.debian.org_2005_01_02 --t4apE7yKrX2dGgJC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Closing the bug, which I should have done a long time ago. --=20 Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Retrait du projet de loi DADVSI: http://eucd.info/petitions/index.php?petit= ion=3D2 --t4apE7yKrX2dGgJC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBQ+iqiF6T+PKoJ87eAQLrAAf/WR2rB25pNJCJBxlQcK81Ozjsw7baohk3 gYFwN4TkzFdI5ZXJOruV8eIjHItVFicxX6j4IsmPF8kBtAQm0vHfz7Wee2q0glKg Kkpfq6G82UAoHtX+OPWTrPLzVe02hcSeO1II6hMb0CnpJd4s6FeeJDA4SfK/RsAq NkWecR5RsBj2qAlcIcrrrZgmYPqjr1CnOZaLzcK5HB4BUL/+4YCI7AQGrA09SnHw In0DD4xyYGaUAGwPfO8Buw2VEwj21mlJeQJzvv1SicVRf1NCevX5FXkpX7FB3+wm hQbU20fV6IXyRyhrcYkMNSIWgbCbFkf3TayxKhuEEZ2WbPwjDQQZ1g== =e1be -----END PGP SIGNATURE----- --t4apE7yKrX2dGgJC--
--- End Message ---

