-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code example bug in the readme #468
Comments
Thank you for pointing out the issue in the Readme. You're right; in Python, lists do not have an attribute named .value. Your proposed solution correctly iterates through the get_projects_response list, and by using project.name, it accesses the name attribute of each TeamProjectReference object in the list. Here's the corrected code for clarity:
|
In python 3.7.3 this code also fails further on Line 23 tries to find the continuation_token attribute of that same list and that does not work either. |
can you provide more details? |
The object created with get_projects_response = core_client.get_projects() does not have a "continuation_token" property. Simply does not exist - it has been discussed elsewhere that this was probably quietly discontinued when the api switched from 6.x to 7.x, but I don't really know. I don't know what details I should provide - the sample code simply does not run as is and the documentation also gives no alternative way to achieve this, I don't personally need the functionality at the moment so I can't test anything further. |
It appears that the issue you're encountering is related to changes in the Azure DevOps Services REST API, particularly the transition from version 6.x to 7.x. The continuation_token property, which was previously available in version 6.x, seems to have been deprecated or removed in the newer version. As of now, the Azure DevOps Python API documentation might not have been updated to reflect this change, leading to the confusion you're experiencing. Unfortunately, without this continuation_token, it's not straightforward to implement pagination or fetch projects beyond the initial response limit set by the API. |
The Readme contains a code error that should be fixed, the list does not have an attribute .value, removing this should solve the problem
(Python 3.10.11)
The text was updated successfully, but these errors were encountered: