IOLoop callbacks not caught properly, affects Radio
See original GitHub issueDescribe the bug I’m seeing error stack traces emitted to Mopidy’s log file by Iris on a frequent basis. At the moment it seems to happen whenever the queue is updated for any reason, and when a track finishes playing. This happens when using clients other than Iris to control Mopidy.
To Reproduce Set any track to play with a client that isn’t Iris (I’m not sure if it does occur with Iris). Whenever I do, I see at least the following messages appear in Mopidy’s log file:
2020-07-12 12:14:29,070 ERROR [944329:IrisFrontend-15] mopidy.listener: Triggering event failed: tracklist_changed()
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mopidy/listener.py", line 40, in on_event
getattr(self, event)(**kwargs)
File "/usr/lib/python3.8/site-packages/mopidy_iris/frontend.py", line 29, in tracklist_changed
iris.ioloop.add_callback(functools.partial(iris.clean_queue_metadata))
AttributeError: 'NoneType' object has no attribute 'add_callback'
2020-07-12 12:16:40,754 ERROR [944329:IrisFrontend-15] mopidy.listener: Triggering event failed: track_playback_ended(tl_track, time_position)
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mopidy/listener.py", line 40, in on_event
getattr(self, event)(**kwargs)
File "/usr/lib/python3.8/site-packages/mopidy_iris/frontend.py", line 26, in track_playback_ended
iris.ioloop.add_callback(functools.partial(iris.check_for_radio_update))
AttributeError: 'NoneType' object has no attribute 'add_callback'
Expected behavior Unnecessary errors in log files has the potential to fill up my disk, so it would be ideal for this to be resolved.
Environment details:
- OS: Arch Linux
- Browser: N/A
- Iris version: 3.50.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (12 by maintainers)
Top Results From Across the Web
tornado.ioloop — Main event loop
Calls the given callback on the next I/O loop iteration. Safe for use from a Python signal handler; should not be used otherwise....
Read more >Write back through the callback attached to IOLoop in Tornado
No, I want response to be patched determine operation timeout. If whole process took 5 seconds - return "not ready". If it took...
Read more >Chapter 3 - Advanced Request-Reply Patterns - ZeroMQ guide
A REP server cannot talk to a REQ client that hasn't first sent it a request. Technically, it's not even possible, and the...
Read more >PyZMQ Documentation - Read the Docs
!= 0, recv events will be flushed even if no callback is registered, unlike normal. IOLoop operation. This allows flush to be used...
Read more >IOLoop wait on callback or detect if on IOLoop thread?
I would like to be able to detect if we are on the ioloop or not. `IOLoop.current() == ioloop` does not work since...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apologies, real life caught up with me. I’ll submit the PR this weekend 👍
@djmattyg007 yeah mate that would be awesome