9and3r / mopidy-ttsgpio

Extension to control mopidy without screen
Apache License 2.0
48 stars 13 forks source link

AttributeError: <ActorProxy for Core (urn:uuid:b975feb9-a04b-4d1d-9eae-36edd319765c), attr_path=('playlists',)> #13

Open tuxpeople opened 4 years ago

tuxpeople commented 4 years ago

I get an error when Mopidy tries to start ttsgpio:

Aug 11 15:30:22 pirateradio mopidy[476]: INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.0.2
Aug 11 15:30:22 pirateradio mopidy[476]: INFO     [MainThread] mopidy.config Loading config from builtin defaults
Aug 11 15:30:22 pirateradio mopidy[476]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Aug 11 15:30:22 pirateradio mopidy[476]: INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Aug 11 15:30:22 pirateradio mopidy[476]: INFO     [MainThread] mopidy.config Loading config from command line options
Aug 11 15:30:25 pirateradio mopidy[476]: INFO     [MainThread] mopidy.__main__ Enabled extensions: stream, m3u, http, file, spotify, softwaremixer, alsamixer, iris, ttsgpio
Aug 11 15:30:25 pirateradio mopidy[476]: INFO     [MainThread] mopidy.__main__ Disabled extensions: none
Aug 11 15:30:28 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Aug 11 15:30:28 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Mixer volume set to 35
Aug 11 15:30:28 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Starting Mopidy audio
Aug 11 15:30:28 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend, SpotifyBackend
Aug 11 15:30:28 pirateradio mopidy[476]: INFO     [Audio-2] mopidy.audio.actor Audio output set to "autoaudiosink"
Aug 11 15:30:43 pirateradio mopidy[476]: INFO     [SpotifyEventLoop] mopidy_spotify.backend Logged in to Spotify in online mode
Aug 11 15:30:43 pirateradio mopidy[476]: INFO     [SpotifyBackend-6] mopidy_spotify.web Logged into Spotify Web API as thomasdeutsch
Aug 11 15:38:41 pirateradio mopidy[476]: INFO     [SpotifyBackend-6] mopidy_spotify.playlists Refreshed 284 Spotify playlists
Aug 11 15:38:41 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Aug 11 15:38:41 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: TtsGpio, IrisFrontend, HttpFrontend
Aug 11 15:38:42 pirateradio mopidy[476]: ERROR    [MainThread] mopidy.commands Got un-handled exception from TtsGpio
Aug 11 15:38:42 pirateradio mopidy[476]: Traceback (most recent call last):
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/lib/python3/dist-packages/mopidy/commands.py", line 241, in _actor_error_handling
Aug 11 15:38:42 pirateradio mopidy[476]:     yield
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/lib/python3/dist-packages/mopidy/commands.py", line 438, in start_frontends
Aug 11 15:38:42 pirateradio mopidy[476]:     frontend_class.start(config=config, core=core)
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 91, in start
Aug 11 15:38:42 pirateradio mopidy[476]:     obj = cls(*args, **kwargs)
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_ttsgpio/frontend.py", line 21, in __init__
Aug 11 15:38:42 pirateradio mopidy[476]:     self.main_menu = MainMenu(self)
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_ttsgpio/main_menu.py", line 13, in __init__
Aug 11 15:38:42 pirateradio mopidy[476]:     self.elements = [PlaylistMenu(frontend), 'exit mopidy']
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_ttsgpio/playlist_menu.py", line 12, in __init__
Aug 11 15:38:42 pirateradio mopidy[476]:     self.reload_playlists()
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_ttsgpio/playlist_menu.py", line 25, in reload_playlists
Aug 11 15:38:42 pirateradio mopidy[476]:     for playlist in self.frontend.core.playlists.playlists.get():
Aug 11 15:38:42 pirateradio mopidy[476]:   File "/usr/lib/python3/dist-packages/pykka/_proxy.py", line 219, in __getattr__
Aug 11 15:38:42 pirateradio mopidy[476]:     raise AttributeError('{} has no attribute {!r}'.format(self, name))
Aug 11 15:38:42 pirateradio mopidy[476]: AttributeError: <ActorProxy for Core (urn:uuid:b975feb9-a04b-4d1d-9eae-36edd319765c), attr_path=('playlists',)> has no attribute 'playlists'
Aug 11 15:38:42 pirateradio mopidy[476]: INFO     [IrisFrontend-10] mopidy_iris.core Starting Iris 3.51.0
Aug 11 15:38:42 pirateradio mopidy[476]: INFO     [HttpFrontend-12] mopidy.http.actor HTTP server running at [::]:6680
Aug 11 15:38:42 pirateradio mopidy[476]: INFO     [MainThread] mopidy.commands Starting GLib mainloop

This is how my current config looks like, anything else is default:

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[audio]
mixer = software
mixer_volume = 35
output = autoaudiosink

[iris]
enabled = true
country = CH
locale = de_CH

[ttsgpio]
enabled = true
#debug_gpio_simulate = false
pin_button_main = 6
pin_button_next = 5
pin_button_previous = 13
pin_button_vol_up = 16
pin_button_vol_down = 26
pin_play_led = 20

[spotify]
enabled = true
username = XXXXXXXXXXXXXXXX
password = XXXXXXXXXXXXXXXX
client_id = XXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXX

[http]
enabled = true
hostname = ::
port = 6680

[m3u]
#playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs = /var/lib/mopidy/media

[alsamixer]
enabled = true
card = 0
control = PCM