Skip to content

git_client is not found in v7_0 #453

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

Closed
lgc019 opened this issue Apr 19, 2023 · 9 comments
Closed

git_client is not found in v7_0 #453

lgc019 opened this issue Apr 19, 2023 · 9 comments
Labels

Comments

@lgc019
Copy link

lgc019 commented Apr 19, 2023

No module named 'azure.devops.v7_0.git.git_client' when trying to use get_git_client()

@MarcoPalu97
Copy link

Same issue spotted by me:

File "/home/vsts/.local/lib/python3.10/site-packages/azure/devops/released/client_factory.py", line 135, in get_git_client
return self._connection.get_client('azure.devops.v7_0.git.git_client.GitClient')
File "/home/vsts/.local/lib/python3.10/site-packages/azure/devops/connection.py", line 44, in get_client
client_class = self._get_class(client_type)
File "/home/vsts/.local/lib/python3.10/site-packages/azure/devops/connection.py", line 52, in _get_class
imported = import(module_name)
File "/home/vsts/.local/lib/python3.10/site-packages/azure/devops/v7_0/git/init.py", line 10, in
from .git_client import GitClient
ModuleNotFoundError: No module named 'azure.devops.v7_0.git.git_client'

Seems like you missed to create the module git_client.py into the v7_0 of the git client, I found it when comparing with v6_0

@jknoy
Copy link

jknoy commented Apr 19, 2023

Seeing the same problem. Looks like git_client.py was deleted as part of v5.1 cleanup, but now missing and causing errors.

@detmoo
Copy link

detmoo commented Apr 19, 2023

Also have problem with this. Looks like from .git_client import GitClient is no longer valid import. Initial look seems like GitClient might have become GitClientBase in v7

@yishuiliunian
Copy link

I have created a PR to fix it. But it is waiting for approval.

#456

@nechvatalp nechvatalp added the bug label Apr 25, 2023
@nechvatalp
Copy link
Collaborator

Thanks for reporting, investigating

@nechvatalp
Copy link
Collaborator

This should be fixed in 7.1.0b2, the source we generate from is setup to generate git_client_base, previous maintainer created the git_client manually as it is more intuitive I wasn't aware of that so didn't include this file.

Added it back in.

@brbeec
Copy link
Member

brbeec commented Apr 25, 2023

@nechvatalp I'm no longer seeing ModuleNotFoundError when calling get_git_client() after #457, however, I'm now seeing DeserializationError when calling get_commits().

azure.core.exceptions.DeserializationError: ("Unable to deserialize to object: type, KeyError: 'ChangeCountDictionary'", KeyError('ChangeCountDictionary'))

It doesn't look like ChangeCountDictionary is defined in models.py?

@nechvatalp
Copy link
Collaborator

Yes, issue was indeed with the ChangeCountDictionary I updated the models, @brbeec could you check if the issue is resolved for you in 7.1.0b3?

@brbeec
Copy link
Member

brbeec commented Apr 26, 2023

Our script is working again with 7.1.0b3. Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants