if yu

iiif

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

The proper way of doing asyncio in Houdini 20's python node? June 28, 2024, 3:03 a.m.

Hi Paul,

Thank you! Your advice helps a lot!

The proper way of doing asyncio in Houdini 20's python node? April 30, 2024, 7:34 a.m.

In houdini 19.5, I can define async functions and invoke with asyncio.new_event_loop().run_until_complete(async_task())in python node

But in houdini 20, this yields error:

  File "C:\Program Files/Side Effects Software/Houdini 20.0.688/houdini/python3.10libs\haio.py", line 2101, in run_until_complete
    self.run_forever()
  File "C:\Program Files/Side Effects Software/Houdini 20.0.688/houdini/python3.10libs\haio.py", line 2079, in run_forever
    assert not self._isUIAvailable()
AssertionError

I've also tried to call asyncio.run(async_task())directly, and following error was raised:

  File "D:\Program Files\Side Effects Software\Houdini 20.0.688\python310\lib\asyncio\runners.py", line 33, in run
raise RuntimeError(
RuntimeError: asyncio.run() cannot be called from a running event loop

Is it still possible to do async things in python node for Houdini 20? And what's the proper way?

Day 21 | Worlds: Urban July 21, 2020, 12:51 p.m.

A quick dirty try