if yu

iiif

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Engine

Availability

Not Specified

Recent Forum Posts

The proper way of doing asyncio in Houdini 20's python node? 2024年6月28日3:03

Hi Paul,

Thank you! Your advice helps a lot!

The proper way of doing asyncio in Houdini 20's python node? 2024年4月30日7:34

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 2020年7月21日12:51

A quick dirty try