AssertionError: Wrong XPath-Expr in Secrecy.parse() '__xml'

Bug #228565 reported by Apport retracing service
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-launchpad-bugs

Current Hardy p-lp-bugs breaks apport retracers:

$ python -c 'import launchpadbugs.connector as Connector; cb = Connector.ConnectBug(); cb.authentication=".lpcookie"; b=cb(204332); print b.private'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/launchpadbugs/lphelper.py", line 261, in <lambda>
    if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
  File "/usr/lib/python2.5/site-packages/launchpadbugs/html_bug.py", line 87, in func
    x.parse()
  File "/usr/lib/python2.5/site-packages/launchpadbugs/html_bug.py", line 853, in parse
    assert self.__xml, "Wrong XPath-Expr in Secrecy.parse() '__xml' (%s)" %(DEBUG_URL or "unknown")
AssertionError: Wrong XPath-Expr in Secrecy.parse() '__xml' (https://launchpad.net/bugs/204332)

Revision history for this message
Apport retracing service (apport) wrote :

The HTML now looks like this:

                      <div id="container" class="private">

                        <div id="maincontent">
                          <div id="big-badges" style="float: right">
                            <img alt="(Private)" width="32" height="32" src="/@@/private-large" title="This bug report was made private by breefru on 2008-03-20" id="privatebadge"/>
                          </div>

Thus //body//div[@id="bug-properties"] does not match any more.

Attached patch works for me.

Revision history for this message
Apport retracing service (apport) wrote :

It would probably work as well to just replace "bug-properties" with "big-badges", but I'll keep my patch in the retracers for now since it looks a bit more robust.

Revision history for this message
Brian Murray (brian-murray) wrote :

This looks like a duplicate of bug 227537 to me. Which version of python-launchpad-bugs were you using?

Revision history for this message
Brian Murray (brian-murray) wrote :

Your test works for me with upstream revision number 92.

Revision history for this message
Markus Korn (thekorn) wrote :

Fix released in py-lp-bugs 0.3

Changed in python-launchpad-bugs:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.