Cannot access some project descriptions.

Asked by Gavan

I'm currently using the Launchpad api to gather information about the hosted projects and as my code is gathering information, I get to a projects that causes an "You tried to access a resource that you don't have the server-side permission to see." message to show up. I am using login_with instead of login_anonymously so my app should have the permissions needed and I can't seem to fix the issue.

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

Do you have a link to the object that caused this, or perhaps an example script that can help us see where the problem might be?

Revision history for this message
Gavan (groth-7) said :
#2

Sure, what i'm doing is asking for information on projects using this code to store it in a database:
         cursor.execute("INSERT INTO `lpd_projects`(`datasource_id`, `name`, \
        `display_name`, `web_link`,`description`, `last_updated`) VALUES (%s,%s,%s,%s,%s,%s)",
         (datasource_id, p.name, p.display_name, p.web_link, p.description, datetime.datetime.now()))

this is inside a helper method that takes a project p, as I loop through launchpad.projects. it works fine until around the 72 project where it then gives me the no server_side permission issue which refers to the description of the project.

Revision history for this message
Colin Watson (cjwatson) said :
#3

Can you insert "print p.self_link" before this statement, so that you can see exactly which project it's failing on?

Revision history for this message
Gavan (groth-7) said :
#4

https://api.launchpad.net/1.0/girden is the project it stops on.

Revision history for this message
Colin Watson (cjwatson) said :
#5

I can't see quite what's going on there, as that project appears to be public at least at the level that the code you've shown would care about. However, in general, iterating over launchpad.projects can return projects that contain non-public information, where you may have access to see some very limited set of attributes (such as name) but not to see others (such as description), even if you're logged in. You'll need to be prepared to handle permission failures when doing that kind of thing.

Can you help with this problem?

Provide an answer of your own, or ask Gavan for more information if necessary.

To post a message you must log in.