Comments (5)
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.
from azure-devops-python-api.
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:
get_projects_response: List[TeamProjectReference] = core_client.get_projects()
index = 0 # Note: 'index' is declared but not used in the loop.
for project in get_projects_response:
print(project.name)
from azure-devops-python-api.
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?
from azure-devops-python-api.
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.
from azure-devops-python-api.
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.
from azure-devops-python-api.
Related Issues (20)
- Attachments from Testcases with Rest Api
- Cannot get accounts list for a multi-organization access token
- list_pipelines() always throws AzureDevOpsAuthenticationError - azure-devops v7.1.0b4
- msrest-for-python is deprecated HOT 1
- git_client.create_repository() Failing with msrest.exceptions.SerializationError
- CreatePipelineConfigurationParameters missing parameters HOT 2
- Client Returns undefined while checking get_feature_state_for_scope for new project
- Implement type hints on top of docstring `rtype`
- update_test_results() is failing even after giving correct runid as well as test case id
- need help to get the run_id based on the test_case_id
- Finding a specific build log is incredibly slow HOT 1
- Bug in "Getting Started" example code on main wiki page
- PAT token security HOT 1
- GitPullRequestChange does not inherit from GitChange/Change
- Search Criteria time ranges are missing HOT 1
- No documentation at all on how to get the pipelines status. please provide an example
- Authentication error with GitClient when getting repository list HOT 3
- Error in running the code give in ReadMe file.
- How to query work items once and get desired fields HOT 1
- Getting incorrect return from get_commit_diffs()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-devops-python-api.