René's URL Explorer Experiment


Title: AttributeError: 'dict' object has no attribute 'version_type' when trying to use git_client.get_commits search_criteria · Issue #526 · microsoft/azure-devops-python-api · GitHub

Open Graph Title: AttributeError: 'dict' object has no attribute 'version_type' when trying to use git_client.get_commits search_criteria · Issue #526 · microsoft/azure-devops-python-api

X Title: AttributeError: 'dict' object has no attribute 'version_type' when trying to use git_client.get_commits search_criteria · Issue #526 · microsoft/azure-devops-python-api

Description: When trying to get all the commits on a branch I get an attribute error. Code: from azure.devops.connection import Connection from azure.devops.v7_0.git import GitClient from azure.devops.v7_0.git.models import GitQueryCommitsCriteria fr...

Open Graph Description: When trying to get all the commits on a branch I get an attribute error. Code: from azure.devops.connection import Connection from azure.devops.v7_0.git import GitClient from azure.devops.v7_0.git....

X Description: When trying to get all the commits on a branch I get an attribute error. Code: from azure.devops.connection import Connection from azure.devops.v7_0.git import GitClient from azure.devops.v7_0.git....

Opengraph URL: https://github.com/microsoft/azure-devops-python-api/issues/526

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AttributeError: 'dict' object has no attribute 'version_type' when trying to use git_client.get_commits search_criteria","articleBody":"When trying to get all the commits on a branch I get an attribute error.\n\nCode:\nfrom azure.devops.connection import Connection\nfrom azure.devops.v7_0.git import GitClient\nfrom azure.devops.v7_0.git.models import GitQueryCommitsCriteria\nfrom msrest.authentication import BasicAuthentication\n\n cm_search_criteria = GitQueryCommitsCriteria(\n               item_version={\"version\": branch_name,\"versionType\": 'branch'}\n            )\n            \n            print (f\"search critera\")\n            print (cm_search_criteria)\n            print (f\"search critera\")\n            \n            commits = git_client.get_commits(\n                repo_name,\n                project=project_name,\n                search_criteria=cm_search_criteria\n            )    \n\nResults:\nTraceback (most recent call last):\n  File \"C:\\PythonWork\\Tool Connectivity\\ADO_ALL_REPOS_BRANCHES_COMMITS.py\", line 66, in \u003cmodule\u003e\n    commits = git_client.get_commits(\n        repo_name,\n        project=project_name,\n        search_criteria=cm_search_criteria\n    )\n  File \"C:\\Users\\tmoran\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\azure\\devops\\v7_0\\git\\git_client_base.py\", line 361, in get_commits\n    if search_criteria.item_version.version_type is not None:\n       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'dict' object has no attribute 'version_type'\n\nI cannot see anything wrong with the code, but it is throwing an error, does any one see an error?","author":{"url":"https://github.com/SCMSADMIN","@type":"Person","name":"SCMSADMIN"},"datePublished":"2025-06-26T02:31:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/526/azure-devops-python-api/issues/526"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:26017bfe-3892-5afb-9ff7-06c9c2d8ecee
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8944:BD9D0:7ECF3C:A844FC:697D2AF3
html-safe-nonce0c1c44a1d32b67a586e12f68022e30f1b5b729a4f0d4b3bdfb93071dd2cdb2e6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTQ0OkJEOUQwOjdFQ0YzQzpBODQ0RkM6Njk3RDJBRjMiLCJ2aXNpdG9yX2lkIjoiNjA4OTk4NzUwODM0NTMxODEzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbe92939e67316f201feaa47344195ad497f571e114778fec7040dc6060a81661
hovercard-subject-tagissue:3177517736
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/azure-devops-python-api/526/issue_layout
twitter:imagehttps://opengraph.githubassets.com/506078a3ee53756e63b16a488865dc10ac21d62cdb0084e6995055ef86a09fa1/microsoft/azure-devops-python-api/issues/526
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/506078a3ee53756e63b16a488865dc10ac21d62cdb0084e6995055ef86a09fa1/microsoft/azure-devops-python-api/issues/526
og:image:altWhen trying to get all the commits on a branch I get an attribute error. Code: from azure.devops.connection import Connection from azure.devops.v7_0.git import GitClient from azure.devops.v7_0.git....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSCMSADMIN
hostnamegithub.com
expected-hostnamegithub.com
None947d30920225f8abb17692477afd5992252045b901780d1bc8fa47c03b5fde64
turbo-cache-controlno-preview
go-importgithub.com/microsoft/azure-devops-python-api git https://github.com/microsoft/azure-devops-python-api.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id107710074
octolytics-dimension-repository_nwomicrosoft/azure-devops-python-api
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id107710074
octolytics-dimension-repository_network_root_nwomicrosoft/azure-devops-python-api
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release92fcc0e25bb4da7fe9a458840cb7f3cafa272eb8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues/526#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fazure-devops-python-api%2Fissues%2F526
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fazure-devops-python-api%2Fissues%2F526
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fazure-devops-python-api
Reloadhttps://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues/526
Reloadhttps://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues/526
Reloadhttps://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues/526
microsoft https://patch-diff.githubusercontent.com/microsoft
azure-devops-python-apihttps://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoft%2Fazure-devops-python-api
Fork 218 https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoft%2Fazure-devops-python-api
Star 675 https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoft%2Fazure-devops-python-api
Code https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api
Issues 142 https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues
Pull requests 13 https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/pulls
Actions https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/actions
Projects 0 https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/projects
Models https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/models
Security 0 https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/security
Insights https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/pulse
Code https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api
Issues https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues
Pull requests https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/pulls
Actions https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/actions
Projects https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/projects
Models https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/models
Security https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/security
Insights https://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/microsoft/azure-devops-python-api/issues/526
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/microsoft/azure-devops-python-api/issues/526
AttributeError: 'dict' object has no attribute 'version_type' when trying to use git_client.get_commits search_criteriahttps://patch-diff.githubusercontent.com/microsoft/azure-devops-python-api/issues/526#top
https://github.com/SCMSADMIN
https://github.com/SCMSADMIN
SCMSADMINhttps://github.com/SCMSADMIN
on Jun 26, 2025https://github.com/microsoft/azure-devops-python-api/issues/526#issue-3177517736
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.