You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> rp = list(session.iter_all("response_plays"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Users\[user]\AppData\Local\Programs\Python\Python39\lib\site-packages\pdpyras.py", line 1058, in iter_all
offset += data['limit']
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType' ```
Same error occurs with list_all and dict_all. Able to receive list via rget method only
The text was updated successfully, but these errors were encountered:
The response plays API is returning null values for limit and offset in the body, which is not expected. So, in other words, this is a bug in the API itself. I've submitted a ticket to the appropriate team that owns this API.
For context: the client by design sets the limit to the limit returned by the API (if it's present in the response body) and increments the offset by that limit if the limit is present in the response. That is for cases where the requested limit is greater than the maximum limit. This prevents incrementing offset by more than the actual page size, so that records won't be skipped over.
The response plays API has been returning null values for offset and limit in its body. By trusting these values from the API, the client set itself up for a TypeError (see #61).
This fixes the issue by incrementing offset by the length of the array of results returned by the index instead of the value reported by the API.
Receive TypeError when doing the following
The text was updated successfully, but these errors were encountered: