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

jadamczyk
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/networks.py", 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/rest_session.py", line 378, in _get_pages_legacy
    response = self.request(metadata, 'GET', url, params=params)
  File "/home/airflow/.local/lib/python3.8/site-packages/meraki/rest_session.py", line 243, in request
    raise APIError(metadata, response)
meraki.exceptions.APIError: networks, getNetworkClientsUsageHistories - 502 Bad Gateway, <html>
<head><title>502 Bad Gateway</title></head>
<body>
<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

0 REPLIES 0
Get notified when there are additional replies to this discussion.