-
Notifications
You must be signed in to change notification settings - Fork 103
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
click on album in local library results in request for core.library.lookup with "uris": ["undefined"] #250
Comments
Does this error also occur when browsing using the standard Mopidy ‘File’ or ‘Local Media’ backend extensions? I don’t have the BeetsLocal extension installed but suspect that might be where the issue is originating from. |
I re-enabled File, Local, and Local SQLite, and then performed a fresh With Local SQLite, I can click through the row with the album title in this view: then the web UI successfully displays an album view: However, with the File backend, this same sequence instead leaves me with a view like this: With the File backend, the UI makes a JSON RPC request like the example above, with The backend responds with an application error: {
"jsonrpc": "2.0",
"id": 25,
"error": {
"message": "Application error",
"code": 0,
"data": {
"message": "Expected a list of URIs, not u'undefined'",
"traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/dist-packages/mopidy/internal/jsonrpc.py\", line 133, in _handle_single_request\n result = self._unwrap_result(result)\n File \"/usr/lib/python2.7/dist-packages/mopidy/internal/jsonrpc.py\", line 222, in _unwrap_result\n result = result.get()\n File \"/usr/lib/python2.7/dist-packages/pykka/threading.py\", line 52, in get\n compat.reraise(*self._data['exc_info'])\n File \"/usr/lib/python2.7/dist-packages/pykka/compat.py\", line 12, in reraise\n exec('raise tp, value, tb')\n File \"/usr/lib/python2.7/dist-packages/pykka/actor.py\", line 201, in _actor_loop\n response = self._handle_receive(message)\n File \"/usr/lib/python2.7/dist-packages/pykka/actor.py\", line 295, in _handle_receive\n return callee(*message['args'], **message['kwargs'])\n File \"/usr/lib/python2.7/dist-packages/mopidy/core/library.py\", line 217, in lookup\n uris is None or validation.check_uris(uris)\n File \"/usr/lib/python2.7/dist-packages/mopidy/internal/validation.py\", line 105, in check_uris\n [check_uri(a, msg) for a in arg]\n File \"/usr/lib/python2.7/dist-packages/mopidy/internal/validation.py\", line 100, in check_uri\n raise exceptions.ValidationError(msg.format(arg=arg))\nValidationError: Expected a list of URIs, not u'undefined'\n",
"type": "ValidationError"
}
}
}
When I take a closer look at the JSON RPC request/response pairs that precede the error, what jumps out is that the Local SQLite backend responds to a lookup request for a track with a album object that contains a {
"method": "core.library.lookup",
"params": {
"uris": [
"local:track:Black%20Star/Mos%20Def%20%26%20Talib%20Kweli%20Are%20Black%20Star/01%20Intro.flac"
]
},
"jsonrpc": "2.0",
"id": 24
}
{
"jsonrpc": "2.0",
"id": 24,
"result": {
"local:track:Black%20Star/Mos%20Def%20%26%20Talib%20Kweli%20Are%20Black%20Star/01%20Intro.flac": [
{
"album": {
"__model__": "Album",
"name": "Mos Def & Talib Kweli Are Black Star",
"num_tracks": 13,
"uri": "local:album:mbid:66df81d2-9787-3838-85fa-fa0de57990f3",
"artists": [
{
"__model__": "Artist",
"musicbrainz_id": "02708fd6-0fe6-4738-a27d-0561ace8b4c6",
"name": "Black Star",
"uri": "local:artist:md5:99d00d9ec7ef29ad8994a8a89468357d"
}
],
"date": "2002-06-04",
"musicbrainz_id": "66df81d2-9787-3838-85fa-fa0de57990f3",
"num_discs": 1
},
"composers": [
{
"__model__": "Artist",
"name": "Mos Def",
"uri": "local:artist:md5:de41d6c37ecd7fdbb01cdcafeb0dbc16"
}
],
"__model__": "Track",
"name": "Intro",
"disc_no": 1,
"uri": "local:track:Black%20Star/Mos%20Def%20%26%20Talib%20Kweli%20Are%20Black%20Star/01%20Intro.flac",
"date": "2002-06-04",
"length": 71880,
"last_modified": 1509589770651,
"track_no": 1,
"artists": [
{
"__model__": "Artist",
"musicbrainz_id": "02708fd6-0fe6-4738-a27d-0561ace8b4c6",
"name": "Black Star",
"uri": "local:artist:md5:99d00d9ec7ef29ad8994a8a89468357d"
}
],
"genre": "Rap",
"musicbrainz_id": "d342f41f-d995-4185-92bc-4c2db314e5c5"
}
]
}
} whereas the album URI is not present in the File backend response: {
"method": "core.library.lookup",
"params": {
"uris": [
"file:///media/Music/Library/Black%20Star/Mos%20Def%20%26%20Talib%20Kweli%20Are%20Black%20Star/01%20Intro.flac"
]
},
"jsonrpc": "2.0",
"id": 36
}
{
"jsonrpc": "2.0",
"id": 36,
"result": {
"file:///media/Music/Library/Black%20Star/Mos%20Def%20%26%20Talib%20Kweli%20Are%20Black%20Star/01%20Intro.flac": [
{
"album": {
"__model__": "Album",
"name": "Mos Def & Talib Kweli Are Black Star",
"num_tracks": 13,
"artists": [
{
"__model__": "Artist",
"musicbrainz_id": "02708fd6-0fe6-4738-a27d-0561ace8b4c6",
"name": "Black Star"
}
],
"date": "2002-06-04",
"musicbrainz_id": "66df81d2-9787-3838-85fa-fa0de57990f3",
"num_discs": 1
},
"composers": [
{
"__model__": "Artist",
"name": "Mos Def"
}
],
"__model__": "Track",
"name": "Intro",
"disc_no": 1,
"uri": "file:///media/Music/Library/Black%20Star/Mos%20Def%20%26%20Talib%20Kweli%20Are%20Black%20Star/01%20Intro.flac",
"date": "2002-06-04",
"length": 71880,
"track_no": 1,
"artists": [
{
"__model__": "Artist",
"musicbrainz_id": "02708fd6-0fe6-4738-a27d-0561ace8b4c6",
"name": "Black Star"
}
],
"genre": "Rap",
"musicbrainz_id": "d342f41f-d995-4185-92bc-4c2db314e5c5"
}
]
}
} It appears that the issue is triggered when the backend responds to a track lookup with an embedded album object that does not include a |
Steps:
Result:
core.library.lookup
with the "uris" param value["undefined]
Request:
Response:
Additional details and software versions:
BeetsLocal plugin is being used to access the local library.
Mopidy (2.1.0)
Mopidy-BeetsLocal (0.0.9)
Mopidy-MusicBox-Webclient (2.4.0)
Python 2.7.13
Lubuntu 16.04
The text was updated successfully, but these errors were encountered: