Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error drawing tree for id#21 in example data #68

Closed
dstansby opened this issue Jun 8, 2022 · 2 comments · Fixed by #78
Closed

Error drawing tree for id#21 in example data #68

dstansby opened this issue Jun 8, 2022 · 2 comments · Fixed by #78
Labels
bug Something isn't working

Comments

@dstansby
Copy link
Contributor

dstansby commented Jun 8, 2022

When trying to draw the tree for track #21 in the example, the tree isn't complete:
Screenshot 2022-06-08 at 09 31 31

and there are a bunch of errors:

WARNING: Error drawing visual <vispy.visuals.line.line._GLLineVisual object at 0x16ecbff70>
WARNING: Traceback (most recent call last):
  File "/Users/dstansby/projects/napari/arboretum/examples/show_sample_data.py", line 26, in <module>
    napari.run()
  File "/Users/dstansby/projects/napari/napari/napari/_qt/qt_event_loop.py", line 402, in run
    app.exec_()
  File "/Users/dstansby/projects/napari/napari/napari/_qt/qt_main_window.py", line 162, in event
    return super().event(e)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/app/backends/_qt.py", line 567, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/app/backends/_qt.py", line 903, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/util/event.py", line 453, in __call__
    self._invoke_callback(cb, event)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/util/event.py", line 471, in _invoke_callback
    _handle_exception(self.ignore_callback_errors,
  << caught exception here: >>
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/util/event.py", line 469, in _invoke_callback
    cb(event)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/scene/canvas.py", line 218, in on_draw
    self._draw_scene()
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/scene/canvas.py", line 277, in _draw_scene
    self.draw_visual(self.scene)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/scene/canvas.py", line 315, in draw_visual
    node.draw()
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/scene/visuals.py", line 103, in draw
    self._visual_superclass.draw(self)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/visuals/visual.py", line 605, in draw
    v.draw()
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/scene/visuals.py", line 103, in draw
    self._visual_superclass.draw(self)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/visuals/visual.py", line 605, in draw
    v.draw()
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/visuals/visual.py", line 451, in draw
    self._program.draw(self._vshare.draw_mode,
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/visuals/shaders/program.py", line 102, in draw
    Program.draw(self, *args, **kwargs)
  File "/Users/dstansby/mambaforge/envs/napari/lib/python3.9/site-packages/vispy/gloo/program.py", line 498, in draw
    raise RuntimeError('All attributes must have the same size, got:\n'
RuntimeError: All attributes must have the same size, got:
<VertexBuffer size=217 last_dim=4>: 217
<VertexBuffer size=218 last_dim=2>: 218
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x17fe8dbe0>> for DrawEvent
WARNING: Error drawing visual <vispy.visuals.line.line._GLLineVisual object at 0x16ecbff70>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x17fe8dbe0>> repeat 2
@dstansby dstansby added the bug Something isn't working label Jun 8, 2022
@quantumjot
Copy link
Collaborator

This is due to a mismatch between the number of vertices drawn for the line versus the number of colours specified for the vertices from the properties. My guess is that this must be because a timestep is missing from the properties that we add when we use range to specify the vertices for the branch.

It might be that we need to specify the actual time points in the Edge node. Will investigate a little more.

@quantumjot quantumjot linked a pull request Jul 1, 2022 that will close this issue
@quantumjot
Copy link
Collaborator

Yup. That was it. Should be fixed in #78 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants