Skip to content

Error when using with ipython #211

@schlegelp

Description

@schlegelp

Hi!

I recently updated my pygfx, wgpu and rendercanvas stack. After the update I started running into issues with a little 3D viewer built on top of your tools. Specifically, running it from ipython is now throwing errors I hadn't encountered before.

I managed to track the problem to the canvas - rendercanvas.qt.QRenderCanvas in my setup. Here is a minimal reproducible example:

>>> %gui qt
>>> from rendercanvas.auto import RenderCanvas
>>> canvas = RenderCanvas()  # <- hitting enter will make the canvas appear
>>>  print("foobar")  # <- entering any further command will lead to an error
foobar

Incompatible awaitable result <Future pending>. Maybe you used asyncio or trio (this does not run on either)?
Incompatible awaitable result <Future pending>. Maybe you used asyncio or trio (this does not run on either)?

Versions:

  • rendercanvas == 2.6.3
  • ipython == 9.13.0
  • python == 3.11.8

Downgrading rendercanvas to 2.4.2 made the issue go away. I can see you had a major refactor just after that version which is the likely cause of the change in behavior.

I guess my question is: Is this a bug or expected? If the latter, is there anything I can do in my setup to make it work again?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions