okta/okta-sdk-python

okta/api_client.py — APIClient::form_response_body — AttributeError: 'str' object has no attribute 'items'

leha007 opened this issue · 0 comments

Getting this error when trying to list groups

client: OktaClient
users, _, error = await client.list_group_users(groupId=group_id)

This call triggers the next Exception:

    users, _, error = await client.list_group_users(groupId=group_id)
  File "okta_api/okta_client_wrapper.py", line 56, in wrapped
    result = await method(*args, **kwargs)
  File "okta_api/okta_client_wrapper.py", line 128, in wrapped
    return await safe_read_all(func, *args, **kwargs)
  File "okta_api/okta_client_wrapper.py", line 106, in wrapped
    output = await func(*args, **kwargs)
  File "okta_api/okta_client_wrapper.py", line 159, in read_all
    casted_results = [_type(APIClient.form_response_body(item)) for item in iteration_result]
  File "okta_api/okta_client_wrapper.py", line 159, in <listcomp>
    casted_results = [_type(APIClient.form_response_body(item)) for item in iteration_result]
  File "okta/api_client.py", line 22, in form_response_body
    for key, val in body.items():

Runtime: CPython==3.11.8
okta==2.9.5

Okta Classic — Version 2024.03.1 C