Bug Report
Actual behavior:
Exception:
File "venv/lib/python3.9/site-packages/arcade/sound.py", line 72, in stop
media.Source._players.remove(player)
ValueError: list.remove(x): x not in list
Expected behavior:
Sound is going to stop playing
Steps to reproduce/example code:
Launch: https://arcade.academy/examples/background_music.html#background-music and wait until end of first song :-)
Enhancement request:
What should be added/changed?
What would it help with?
Documentation request:
What documentation needs to change?
Where is it located?
arcade/sound.py
What is wrong with it? How can it be improved?
ValueError: list.remove(x): x not in list
Trackback from background-music example:
Traceback (most recent call last):
File "test.py", line 105, in
main()
File "test.py", line 101, in main
arcade.run()
File "venv/lib/python3.9/site-packages/arcade/window_commands.py", line 240, in run
pyglet.app.run()
File "venv/lib/python3.9/site-packages/pyglet/app/init.py", line 107, in run
event_loop.run()
File "venv/lib/python3.9/site-packages/pyglet/app/base.py", line 167, in run
timeout = self.idle()
File "venv/lib/python3.9/site-packages/pyglet/app/base.py", line 237, in idle
redraw_all = self.clock.call_scheduled_functions(dt)
File "venv/lib/python3.9/site-packages/pyglet/clock.py", line 292, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "venv/lib/python3.9/site-packages/arcade/application.py", line 223, in _dispatch_updates
self.dispatch_event('on_update', delta_time)
File "venv/lib/python3.9/site-packages/pyglet/window/init.py", line 1333, in dispatch_event
if EventDispatcher.dispatch_event(self, *args) != False:
File "venv/lib/python3.9/site-packages/pyglet/event.py", line 415, in dispatch_event
if getattr(self, event_type)(*args):
File "test.py", line 94, in on_update
self.music.stop(self.current_player)
File "venv/lib/python3.9/site-packages/arcade/sound.py", line 72, in stop
media.Source._players.remove(player)
ValueError: list.remove(x): x not in list
Bug Report
Actual behavior:
Exception:
File "venv/lib/python3.9/site-packages/arcade/sound.py", line 72, in stop
media.Source._players.remove(player)
ValueError: list.remove(x): x not in list
Expected behavior:
Sound is going to stop playing
Steps to reproduce/example code:
Launch: https://arcade.academy/examples/background_music.html#background-music and wait until end of first song :-)
Enhancement request:
What should be added/changed?
What would it help with?
Documentation request:
What documentation needs to change?
Where is it located?
arcade/sound.py
What is wrong with it? How can it be improved?
ValueError: list.remove(x): x not in list
Trackback from background-music example:
Traceback (most recent call last):
File "test.py", line 105, in
main()
File "test.py", line 101, in main
arcade.run()
File "venv/lib/python3.9/site-packages/arcade/window_commands.py", line 240, in run
pyglet.app.run()
File "venv/lib/python3.9/site-packages/pyglet/app/init.py", line 107, in run
event_loop.run()
File "venv/lib/python3.9/site-packages/pyglet/app/base.py", line 167, in run
timeout = self.idle()
File "venv/lib/python3.9/site-packages/pyglet/app/base.py", line 237, in idle
redraw_all = self.clock.call_scheduled_functions(dt)
File "venv/lib/python3.9/site-packages/pyglet/clock.py", line 292, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "venv/lib/python3.9/site-packages/arcade/application.py", line 223, in _dispatch_updates
self.dispatch_event('on_update', delta_time)
File "venv/lib/python3.9/site-packages/pyglet/window/init.py", line 1333, in dispatch_event
if EventDispatcher.dispatch_event(self, *args) != False:
File "venv/lib/python3.9/site-packages/pyglet/event.py", line 415, in dispatch_event
if getattr(self, event_type)(*args):
File "test.py", line 94, in on_update
self.music.stop(self.current_player)
File "venv/lib/python3.9/site-packages/arcade/sound.py", line 72, in stop
media.Source._players.remove(player)
ValueError: list.remove(x): x not in list