-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Normal
-
None
-
Component/s: listenbrainz-labs
-
None
When using the recording-mbid-lookup method on the labs api or frontend, it either returns empty (via the api) or renders this error:
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/datasethoster/main.py", line 211, in web_query_handler results = query.fetch(inputs, RequestSource.web) File "/code/listenbrainz/listenbrainz/labs_api/labs/api/recording_from_recording_mbid.py", line 67, in fetch output = [RecordingFromRecordingMBIDOutput(**row) for row in output] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/usr/local/lib/python3.13/site-packages/pydantic/main.py", line 341, in __init__ raise validation_error pydantic.error_wrappers.ValidationError: 9 validation errors for RecordingFromRecordingMBIDOutput tags -> 0 str type expected (type=type_error.str) tags -> 1 str type expected (type=type_error.str) tags -> 2 str type expected (type=type_error.str) tags -> 3 str type expected (type=type_error.str) tags -> 4 str type expected (type=type_error.str) tags -> 5 str type expected (type=type_error.str) tags -> 6 str type expected (type=type_error.str) tags -> 7 str type expected (type=type_error.str) tags -> 8 str type expected (type=type_error.str)
... any browser/API client should repro.
Analysis:
The issue looks to have been introduced by adding the tags field to the RecordingFromRecordingMBIDOutput here (https://github.com/metabrainz/listenbrainz-server/blob/40dfa8484a5dfeccac57be8e81e1f3756987bb84/listenbrainz/labs_api/labs/api/recording_from_recording_mbid.py#L34)
..from this commit last week:
https://github.com/metabrainz/listenbrainz-server/commit/b8258abef351ee114f851f1fb2b7ebc1d22d3470
I don't know enough about the dataset but I'd surmise this is fixed with converting the tags type to Optional[list[str]] or if required, maybe upstream the query is not providing the needed results.