Skip to content

git_client is not found in v7_0 #453

Closed

Description

@lgc019

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

Activity

  1. MarcoPalu97 commented on Apr 19, 2023

    @MarcoPalu97

    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

  2. jknoy commented on Apr 19, 2023

    @jknoy

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

  3. detmoo commented on Apr 19, 2023

    @detmoo

    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

  4. yishuiliunian commented on Apr 22, 2023

    @yishuiliunian

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

    #456

  5. nechvatalp commented on Apr 25, 2023

    @nechvatalp
    Collaborator

    Thanks for reporting, investigating

  6. nechvatalp commented on Apr 25, 2023

    @nechvatalp
    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.

  7. brbeec commented on Apr 25, 2023

    @brbeec
    Member

    Petr Nechvátal (@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?

  8. nechvatalp commented on Apr 26, 2023

    @nechvatalp
    Collaborator

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

  9. brbeec commented on Apr 26, 2023

    @brbeec
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions