series lookup via string gives horrible error

Bug #524766 reported by Robert Collins
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

 affects launchpad
 done

Trying to get a series from a project using launchpadlib;

    series = proj.series[seriesname]
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py",
line 705, in __getitem__
    found_slice = self._get_slice(slice(key, key+1))
TypeError: cannot concatenate 'str' and 'int' objects

This is kindof ugly. At the top level 'launchpad.projects["foo"]' works,
so one expects collections to be string indexed further down the
hierarchy.

(I realise there is getSeries, but why don't you then need to do
launchpad.getProject("foo"))

-Rob

Curtis Hovey (sinzui)
affects: launchpad → launchpadlib
Changed in launchpadlib:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Curtis Hovey (sinzui) wrote :

launchpad.projects works because projects is a utility designed to lookup by name. project.series does nto work because series is a resultset. We do not have a driving need to get item access in projects at this time.

affects: launchpadlib → launchpad-registry
Revision history for this message
William Grant (wgrant) wrote :

It's far worse than that -- launchpad.projects is actually a hardcoded hack in launchpadlib that manually constructs URLs.

Curtis Hovey (sinzui)
tags: added: api
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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