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

Multi-alarm: mopidy_alarmclock.alarm_manager Could not get current playback volume #17

Open
dubaleeiro opened this issue Dec 28, 2020 · 3 comments

Comments

@dubaleeiro
Copy link

dubaleeiro commented Dec 28, 2020

Dear @rgov,

I am working on further enhancements on your implementation for multiple alarms and came across to the following error which I can't find any solution...
I was wondering whether you could spend some time and take a look:

Dec 28 14:12:02 raspberrypi mopidy[5459]: INFO     [Thread-51] mopidy_alarmclock.alarm_manager Triggering alarm 14:12 alarm
Dec 28 14:12:03 raspberrypi mopidy[5459]: ERROR    [Thread-51] mopidy_alarmclock.alarm_manager Could not get current playback volume
Dec 28 14:12:03 raspberrypi mopidy[5459]: Traceback (most recent call last):
Dec 28 14:12:03 raspberrypi mopidy[5459]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_alarmclock/alarm_manager.py", line 222, in adjust_volume
Dec 28 14:12:03 raspberrypi mopidy[5459]:     current_volume = self.core.playback.volume.get()
Dec 28 14:12:03 raspberrypi mopidy[5459]:   File "/usr/local/lib/python3.7/dist-packages/pykka/_proxy.py", line 219, in __getattr__
Dec 28 14:12:03 raspberrypi mopidy[5459]:     raise AttributeError('{} has no attribute {!r}'.format(self, name))
Dec 28 14:12:03 raspberrypi mopidy[5459]: AttributeError: <ActorProxy for Core (urn:uuid:edb24319-67b2-4d61-96d2-1aaed19a2052), attr_path=('playback',)> has no attribute 'volume'
`459]:     current_volume = self.core.playback.volume.get()
Dec 28 14:12:03 raspberrypi mopidy[5459]:   File "/usr/local/lib/python3.7/dist-packages/pykka/_proxy.py", line 219, in __getattr__
Dec 28 14:12:03 raspberrypi mopidy[5459]:     raise AttributeError('{} has no attribute {!r}'.format(self, name))
Dec 28 14:12:03 raspberrypi mopidy[5459]: AttributeError: <ActorProxy for Core (urn:uuid:edb24319-67b2-4d61-96d2-1aaed19a2052), attr_path=('playback',)> has no attribute 'volume'

Thanks a lot !

@rgov
Copy link

rgov commented Dec 28, 2020

Hi @dubaleeiro, unfortunately I have not used this in many years and the cause of the error is not obvious to me.

@dubaleeiro
Copy link
Author

dubaleeiro commented Dec 28, 2020 via email

@DavisNT
Copy link
Owner

DavisNT commented Dec 28, 2020

@dubaleeiro Looks like the error occurs due to differences in APIs of different Mopidy versions (@rgov's PR is for Mopidy version lower than 3; current version of Mopidy is 3.x).
Here is the upgrade to Mopidy 3 (and Python 3) that was done in the stable version of Mopidy-AlarmClock (changes in Mopidy APIs used by stable version should be visible there): ca7fe9a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants