question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IOLoop callbacks not caught properly, affects Radio

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
djmattyg007commented, Jul 31, 2020

Apologies, real life caught up with me. I’ll submit the PR this weekend 👍

1reaction
jaedbcommented, Jul 15, 2020

@djmattyg007 yeah mate that would be awesome

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found