brainworkshop
brainworkshop copied to clipboard
Error when navigating to graph view
I'm using the latest commit on master.
When in regular (non-manual) mode, and I tap G to see the graph view of performance, the app exits and I get this error in the console:
2023-01-01 11:19:58.217 Python[54254:3765688] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/34/vs3gz3zn02sbkz6z556qyszw0000gn/T/org.python.python.savedState
Traceback (most recent call last):
File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 4820, in <module>
pyglet.app.run()
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/__init__.py", line 107, in run
event_loop.run(interval)
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/base.py", line 186, in run
timeout = self.idle()
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/base.py", line 247, in idle
self.clock.call_scheduled_functions(dt)
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/clock.py", line 262, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/base.py", line 153, in _redraw_windows
window.dispatch_event('on_draw')
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/window/__init__.py", line 1363, in dispatch_event
super().dispatch_event(*args)
File "/opt/homebrew/lib/python3.10/site-packages/pyglet/event.py", line 415, in dispatch_event
if handler(*args):
File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 4646, in on_draw
graph.draw()
File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 1590, in draw
self.create_batch()
File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 1622, in create_batch
self.batch.add(3, pyglet.gl.GL_LINE_STRIP,
AttributeError: 'Batch' object has no attribute 'add'
No longer crashes after fix for #49. But app is blank, with no graph displayed, after tapping G.
yes, pyglet 2.x support is not complete yet
Solved with the Issue #62