microsoft / microsoft/azure-devops-python-api

azure.devops.v6_0.graph.models.PagedGraphUsers.as_dict() fails if continuation_token is not None

Open
#312 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
684
Forks
218
Avg merge
8d 10h
Merged PRs (30d)
1

Description

azure-devops==6.0.0b2

If continuation_token response on clients_v6_0.get_graph_client list_users() response is not None (i.e. multiple pages) then the as_dict() method on the PagedGraphUsers object fails:

  File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/msrest/serialization.py", line 269, in as_dict
    return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly)
  File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/msrest/serialization.py", line 481, in _serialize
    new_attr = self.serialize_data(orig_attr, attr_desc['type'], **kwargs)
  File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/msrest/serialization.py", line 707, in serialize_data
    data, data_type[1:-1], **kwargs)
  File "/opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/msrest/serialization.py", line 778, in serialize_iter
    raise SerializationError("Refuse str type as a valid iter type.")
msrest.exceptions.SerializationError: Refuse str type as a valid iter type

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure through clients_v6_0.get_graph_client().list_users() when the response has a continuation_token, then inspect PagedGraphUsers.as_dict() and the msrest serialization traceback. Done means as_dict() handles a non-None continuation token without raising SerializationError, with regression coverage for the multi-page response case.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.