Closed michaeldcanady closed 3 years ago
Your asynchronous CSLookup
function returns a coroutine and must be called with await
. Try this:
self.ticketDict = await self.CSLookup()
btw - your code seems to be doing some nested lookups and expansions (e.g. value = deviceTypeDic[value]
). Do you know about nested schemas? If not, check out this example: https://github.com/rbw/aiosnow/blob/master/examples/table/read/nested.py
I ended up needing to get another module, I was trying to create an asyncio class (not natively supported). Thank you though, those resources will be useful later on!
I have this snippet with a class:
when i call it like this:
self.ticketDict = self.CSLookup()
the return outputs as:
<coroutine object gatherer.CSLookup at 0x00000242508A12C0>
How do I get self.ticketDict to be a dictionary as apposed to a coroutine object?