Skip to content

Issue when getting Pull Request participant user (Expected type of data is [user], got [app_user]) #1570

@gubenkoved

Description

@gubenkoved

I believe the following traceback tells pretty much the whole story here:

  File ".../python3.12/site-packages/atlassian/bitbucket/cloud/common/users.py", line 45, in user
    return User(None, self.get_data("user"), **self._new_session_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../python3.12/site-packages/atlassian/bitbucket/cloud/common/users.py", line 6, in __init__
    super(User, self).__init__(url, *args, data=data, expected_type="user", **kwargs)
  File ".../python3.12/site-packages/atlassian/bitbucket/cloud/base.py", line 25, in __init__
    raise ValueError(f"Expected type of data is [{expected_type}], got [{self.get_data('type')}].")
ValueError: Expected type of data is [user], got [app_user].

Environment:

Package              Version     
-------------------- -----------
atlassian-python-api 4.0.4
❯ python -V 
Python 3.12.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bitbucketAtlassian Bitbucket (Cloud or Server)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions