Skip to content

aio exception problem #73

Description

@TribesTom

Hello,

I think there is a problem with the exception AsyncAPIError(Exception):

When an exception occur, the exception try to call self.response.json()
Or it should be awaited.

The exception :

PS C:\Users\ttr\Documents\dev\meraki-winmonitor> python.exe .\win-meraki-provide.py -c .\config.ini -m Y C:\Users\ttr\AppData\Local\Programs\Python\Python38-32\lib\site-packages\meraki\exceptions.py:37: RuntimeWarning: coroutine 'ClientResponse.json' was never awaited self.message = self.response.json() if self.response.json() else None RuntimeWarning: Enable tracemalloc to get the object allocation traceback Test 1 : ****** .\win-meraki-provide.py:311: RuntimeWarning: coroutine 'ClientResponse.json' was never awaited print('Test 1 : {}'.format(org['name'])) RuntimeWarning: Enable tracemalloc to get the object allocation traceback

The code used :

` try:

    results = await aiomeraki.organizations.getOrganizationInventory(org["id"],includeLicenseInfo ='True')

except:

    print('Test 1 : {}'.format(org['name']))`

It happen if the organisation is not licensed by device.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions