Git Product home page Git Product logo

Comments (5)

typorian avatar typorian commented on June 2, 2024 2

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.

eramireziceibm avatar eramireziceibm commented on June 2, 2024 1

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.

eramireziceibm avatar eramireziceibm commented on June 2, 2024

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.

typorian avatar typorian commented on June 2, 2024

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.

eramireziceibm avatar eramireziceibm commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.