Replies: 2 comments 5 replies
-
Did you try this? for child in await ua_obj.get_properties():
..... |
Beta Was this translation helpful? Give feedback.
4 replies
-
even if you are awaiting something inside of get_properties you still need to await the function itself (its asyncio not threading!) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Node ua_obj. I try to get the properties with ua_obj.get_properties() and then try to iterate over them, but I get the error
TypeError: 'coroutine' object is not iterable
sys:1: RuntimeWarning: coroutine 'Node.get_children' was never awaited
Further investigation leads me to the get_properties method of Node with call Node.get_children. This function is an async function but in get_properties is never awaited. get_properties is also not an async function.
I don't have a lot experience with asyncio but I believe this is a bug. The get_properties method should be async (as well as the get_variables and get_mthoedsfunction) and the get_children call should be awaited.
Can this be confirmed?
Beta Was this translation helpful? Give feedback.
All reactions