Closed abulka closed 3 years ago
Hi Andy, I've checked. It is because you call "StartCoroutine" on the MainApp. You should call it on the wx.Window instead. Replace:
StartCoroutine(self.async_callback, self)
by:
StartCoroutine(self.async_callback, self.frame)
I need to add the same exception check in "StartCoroutine" that is already in "AsyncBind" to make it more clear.
if not isinstance(object, wx.Window):
raise Exception("object must be a wx.Window")
Tell me if this solves your issue.
Hi,
Thanks for the quick response.
Yes changing the second parameter to self.frame
fixes the problem.
Curious how my app ever worked properly with the wrong parameter type being passed in by me before!, but happy I have a fix now.
Launching this demo repro app using wxasync 0.41 works OK. Under 0.42 it fails with an error
coroutine 'MainApp.async_callback' was never awaited
Under wxasync version 0.42 I get
caused by the following line of code in wxasync 7c7c5fe7559e83c47b4fd7d0007a92f7ef0e3b80
This is causing problems downstream in my app Pynsource.