Python SDK not working - 502 error or no response at all

Just browsing

Python SDK not working - 502 error or no response at all

I am getting the following error when using Python SDK (synchronous version) with getNetworkClientsUsageHistories endpoint with large number of entries per page, i.e. above 64 (docs say that 1000 is the limit):



  File "/home/airflow/.local/lib/python3.8/site-packages/meraki/api/", line 402, in getNetworkClientsUsageHistories
    return self._session.get_pages(metadata, resource, params, total_pages, direction)
  File "/home/airflow/.local/lib/python3.8/site-packages/meraki/", line 378, in _get_pages_legacy
    response = self.request(metadata, 'GET', url, params=params)
  File "/home/airflow/.local/lib/python3.8/site-packages/meraki/", line 243, in request
    raise APIError(metadata, response)
meraki.exceptions.APIError: networks, getNetworkClientsUsageHistories - 502 Bad Gateway, <html>
<head><title>502 Bad Gateway</title></head>
<center><h1>502 Bad Gateway</h1></cente




For very small pages (e.g. 3, 16, 32) it works, but returns only the first page, even when using `total_pages="all"`.


Whan can I do about this?


EDIT: it does work when using >32 client IDs from Postman

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.