-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
I'm trying to run the minimal example from the docs, but it raises an AttributeError
related to ImFontAtlas
.
Code causing the error:
import fastplotlib as fpl
import imageio.v3 as iio
# create a `Figure`
fig = fpl.Figure()
# read data
data = iio.imread("imageio:astronaut.png")
# add image graphic
image_graphic = fig[0, 0].add_image(data=data)
# show the plot
fig.show()
if __name__ == "__main__":
fpl.run()
Full output from script
No config found!
EGL says it can present to the window but not natively
Max vertex attribute stride unknown. Assuming it is 2048
Max vertex attribute stride unknown. Assuming it is 2048
Max vertex attribute stride unknown. Assuming it is 2048
Traceback (most recent call last):
File "/media/astro/New Volume/Fastplotlib_Interactions/fastplotlib_testing.py", line 5, in <module>
fig = fpl.Figure()
File "/media/astro/New Volume/Fastplotlib_Interactions/venv/lib/python3.13/site-packages/fastplotlib/layouts/_imgui_figure.py", line 67, in __init__
self._imgui_renderer = ImguiRenderer(self.renderer.device, self.canvas)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/astro/New Volume/Fastplotlib_Interactions/venv/lib/python3.13/site-packages/wgpu/utils/imgui/imgui_renderer.py", line 94, in __init__
self._backend = ImguiWgpuBackend(device, render_target_format)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/astro/New Volume/Fastplotlib_Interactions/venv/lib/python3.13/site-packages/wgpu/utils/imgui/imgui_backend.py", line 128, in __init__
self._create_device_objects()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/media/astro/New Volume/Fastplotlib_Interactions/venv/lib/python3.13/site-packages/wgpu/utils/imgui/imgui_backend.py", line 192, in _create_device_objects
self.create_fonts_texture()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/media/astro/New Volume/Fastplotlib_Interactions/venv/lib/python3.13/site-packages/wgpu/utils/imgui/imgui_backend.py", line 146, in create_fonts_texture
font_matrix = self.io.fonts.get_tex_data_as_rgba32()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'imgui_bundle._imgui_bundle.imgui.ImFontAtlas' object has no attribute 'get_tex_data_as_rgba32'
Steps to reproduce:
-
Create a new virtual environment with Python 3.13:
python3 -m venv venv source venv/bin/activate
-
Install fastplotlib with notebook and imgui support:
pip install -U "fastplotlib[notebook,imgui]"
-
Install imageio:
pip install imageio
-
Run the example script above with Python 3.
Environment:
-
OS: Ubuntu 24.04.2 LTS (Observed a similar issue on Windows as well, anaconda environment was used there)
-
Python: 3.13
-
fastplotlib version: 0.5.0
-
Could this be a compatibility issue with the version of
imgui
orimgui_bundle
currently installed? -
Would appreciate any pointers on required
imgui
versions or dependencies.
Metadata
Metadata
Assignees
Labels
No labels