Repository: mopidy/mopidy-spotify (language: python)

Issue:
A particular input breaks search
Hi. I've been using mopidy-spotify successfully for about a year. It's been brought to my attention that searching for a particular input will break search.

The [code](https://github.com/zynga/BossAlienMediaPlayer/blob/60c5a32919eb7cb1e583c83a4da0c6e5860b369c/mopidy_bamp/mopidy_bamp/search_request_handler.py#L51) is calling core.library.search with the following arguments:

```
query = {'any': ['culture', 'shock']}
uris= ["spotify:"]
exact=False
```

I would expect that search would return a list with the results of the search. Instead, I'm getting this exception and this warning:

```
INFO     2020-10-04 10:48:00,207 [6:SpotifyBackend-5] pykkabamp_1     |   Exception returned from SpotifyBackend (urn:uuid:1552f643-aba3-48d1-8017-a9946676518c) to caller:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 193, in _actor_loop
    response = self._handle_receive(envelope.message)
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 299, in _handle_receive
    return callee(*message.args, **message.kwargs)
  File "/usr/lib/python3/dist-packages/mopidy_spotify/library.py", line 49, in search
    exact,
  File "/usr/lib/python3/dist-packages/mopidy_spotify/search.py", line 104, in search
    uri=uri, albums=albums, artists=artists, tracks=tracks
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 159, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 35, in __init__
    self._set_field(key, value)
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 188, in _set_field
    object.__setattr__(self, name, value)
  File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 50, in __set__
    value = self.validate(value)
  File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 176, in validate
    f"Expected {self._name} to be a collection of "
TypeError: Expected tracks to be a collection of Track, not [Track(album=Album(artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Love To Give', uri='spotify:album:0UTEQDl8kWLzdAJr8WTzQq'), artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=202774, name='Love To Give', track_no=1, uri='spotify:track:0Rww3ql3uRmzTvLOVBFlpn'), Track(album=Album(artists=[Artist(name='Au/Ra', uri='spotify:artist:1eMmoIprPDWeFdB1FxU6ZV')], name='Panic Room (Culture Shock Remix)', uri='spotify:album:7rvQyPqIlW7P4prPBXLrj7'), artists=[Artist(name='Au/Ra', uri='spotify:artist:1eMmoIprPDWeFdB1FxU6ZV'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=286725, name='Panic Room - Culture Shock Remix', track_no=1, uri='spotify:track:7yahqANoaeBiBRlMZQacCN'), Track(album=Album(artists=[Artist(name='Polyphia', uri='spotify:artist:4vGrte8FDu062Ntj0RsPiZ')], name='Renaissance', uri='spotify:album:1Ki56K82avE7nTkZEyVIE7'), artists=[Artist(name='Polyphia', uri='spotify:artist:4vGrte8FDu062Ntj0RsPiZ')], disc_no=1, length=282000, name='Culture Shock', track_no=1, uri='spotify:track:18nIT109rUq0xNzMXqtlGj'), Track(album=Album(artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name="Don't Sleep", uri='spotify:album:3UPyT00GNGKMsDjrJcQsEW'), artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=223448, name="Don't Sleep", track_no=1, uri='spotify:track:75vSTQoc5cVlEdpsrNRNWV'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Visions', uri='spotify:album:1rFayernzczucYT7kjfeVZ'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=202068, name='Visions', track_no=1, uri='spotify:track:0hvnXPXNdMCt91J1k4HPCE'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Renaissance (Edit)', uri='spotify:album:3RUI7eTdOuLeQJcDilWO6f'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=209549, name='Renaissance (Edit)', track_no=1, uri='spotify:track:016iTFDW3ZCIxnw6NN2JZP'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], name='2.0 Blackmarket', uri='spotify:album:7f55vO0awZSDVBSwIxKC9z'), artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], disc_no=1, length=249485, name='Avenue', track_no=10, uri='spotify:track:5BP7hbztSNgAQpsBKthhAI'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], name='2.0 Blackmarket', uri='spotify:album:7f55vO0awZSDVBSwIxKC9z'), artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], disc_no=1, length=213719, name='Slip And Fall', track_no=5, uri='spotify:track:1nQyOab4vYIAIa0bZ3j1sa'), Track(album=Album(artists=[Artist(name='Seinabo Sey', uri='spotify:artist:4X0v8sFoDZ6rIfkeOeVm2i')], name='Pistols At Dawn (The Remixes)', uri='spotify:album:2f0ZOCie4hs8Hc9CFSe0md'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Seinabo Sey', uri='spotify:artist:4X0v8sFoDZ6rIfkeOeVm2i')], disc_no=1, length=322758, name='Pistols At Dawn - Culture Shock Remix', track_no=1, uri='spotify:track:4qiZQHy45fY8x5co7oFfPk'), Track(album=Album(artists=[Artist(name='Sub Focus', uri='spotify:artist:0QaSiI5TLA4N7mcsdxShDO')], name='Torus', uri='spotify:album:5VDg2zP4jsc8Ufj1dPEA3d'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='TC', uri='spotify:artist:6b1Reb7bhjdXtkR7wUYW61'), Artist(name='Sub Focus', uri='spotify:artist:0QaSiI5TLA4N7mcsdxShDO')], disc_no=1, length=358359, name='You Make It Better', track_no=11, uri='spotify:track:2X5mKe0FrN5NXevfZyhkET'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='City Lights', uri='spotify:album:7JNDwabJLvRxLOLUC3kVeQ'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Bryn Christopher', uri='spotify:artist:7mWMzxN6IAIQ1tfFFtAiQv')], disc_no=1, length=205967, name='City Lights', track_no=1, uri='spotify:track:4wttEqjVKxDFfKiTp16izN'), Track(album=Album(artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Love To Give', uri='spotify:album:7coUscsSYPShGCxHe99mqd'), artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=206975, name='Love To Give - Acoustic', track_no=2, uri='spotify:track:0GrNrohiAbbhbaCehLYJvj'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6zZYTWiIQEBe7ioLs7qyup')], name='Legal Tender 2.5', uri='spotify:album:3turGoE7FIxsuzWtyTCHQy'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6zZYTWiIQEBe7ioLs7qyup')], disc_no=1, length=216346, name='Exed Up', track_no=2, uri='spotify:track:5JAcohHwQK0g0g4bBBN05L'), Track(album=Album(artists=[Artist(name='Various Artists', uri='spotify:artist:0LyfQWJT6nXafLPZqxe9Of')], name='Drum&BassArena 2018', uri='spotify:album:5eUMDwLFf1FCmZTPlKl2la'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=281706, name='Bunker', track_no=7, uri='spotify:track:2fskG5GBNDOADuDdDWSan5'), Track(album=Album(artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Love To Give', uri='spotify:album:7coUscsSYPShGCxHe99mqd'), artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=202758, name='Love To Give', track_no=1, uri='spotify:track:7kPmhA0jDfkzaqeFfbtZUe'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='LSB', uri='spotify:artist:7M5ogsZnEm96Va8wLKvftN')], name='There for You (LSB Remix)', uri='spotify:album:0hUaDrgADLx4kpJbM9Nrjw'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='LSB', uri='spotify:artist:7M5ogsZnEm96Va8wLKvftN')], disc_no=1, length=353103, name='There for You (LSB Remix)', track_no=1, uri='spotify:track:7L36mVyep2MfHUUcIpRdeP'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Get Physical', uri='spotify:album:1MdMpfgkUMrfe1TkMBQUWC'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=295386, name='Get Physical', track_no=1, uri='spotify:track:5LzM8yFPbJl0DAZhcsK8xP'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Have It All / Pandemic', uri='spotify:album:3hhe4TEOzGEfgRTcRoP6HS'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Raphaella Mazaheri-Asadi', uri='spotify:artist:6MwQzllKf0MajkqMIgFoan')], disc_no=1, length=303194, name='Have It All (feat. Raphaella)', track_no=1, uri='spotify:track:0VQ7XL2V5Szj5ccF59HXYH'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], name='2.0 Blackmarket', uri='spotify:album:7f55vO0awZSDVBSwIxKC9z'), artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], disc_no=1, length=217276, name='Still In Love', track_no=4, uri='spotify:track:5u46W4ZlyQ9kQ3mD7X0XK5'), Track(album=Album(artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name="Don't Sleep", uri='spotify:album:3UPyT00GNGKMsDjrJcQsEW'), artists=[Artist(name='Dimension', uri='spotify:artist:1QMgre3BHX161ZHtWMUu6S'), Artist(name='Billy Lockett', uri='spotify:artist:2lKeiALM1T2TZrOiTYlLNA'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=202774, name='Love To Give', track_no=2, uri='spotify:track:2piI4ovaKsyphgPCUX7r46'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Take Control', uri='spotify:album:56tUVhEvrYo9J3lPZzTy9v'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=298086, name='Take Control', track_no=1, uri='spotify:track:31733EiuBEBNhelaSW8yAI'), Track(album=Album(artists=[Artist(name='Camo & Krooked', uri='spotify:artist:2N8IPNZTiNo3nj4mreOlHU')], name='MOSAIK REMIXED', uri='spotify:album:5eKnogujRkuxGtHhXUEqWe'), artists=[Artist(name='NIHILS', uri='spotify:artist:0O7NhieDairfQvi9jr66Cx'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Camo & Krooked', uri='spotify:artist:2N8IPNZTiNo3nj4mreOlHU')], disc_no=1, length=253772, name='Broken Pieces (feat. Nihils) - Culture Shock Remix', track_no=1, uri='spotify:track:0fgAk9XxXI7ayA9IXDGzFg'), Track(album=Album(artists=[Artist(name='Bebetta', uri='spotify:artist:1UGUF4voyBXt5wXrLjvS5s'), Artist(name='Luna Semara', uri='spotify:artist:04moHHOQdOW4g4Ikktxfpu'), Artist(name='Namito', uri='spotify:artist:6E8wYeE1CsvOUO031l9QGJ')], name='Culture Shock (Bebetta Remix)', uri='spotify:album:73wmbyEEPEgDkRI00p92J0'), artists=[Artist(name='Bebetta', uri='spotify:artist:1UGUF4voyBXt5wXrLjvS5s'), Artist(name='Luna Semara', uri='spotify:artist:04moHHOQdOW4g4Ikktxfpu'), Artist(name='Namito', uri='spotify:artist:6E8wYeE1CsvOUO031l9QGJ')], disc_no=1, length=432000, name='Culture Shock - Bebetta Remix', track_no=1, uri='spotify:track:3SAgy00neaXsD4yM0eZrhf'), Track(album=Album(artists=[Artist(name='Tunnelvisions', uri='spotify:artist:0IhfJZiFjHqE9mJ9INjp7x')], name='Channel Tropico', uri='spotify:album:4BDLbc3uglncbs9bzUqHPQ'), artists=[Artist(name='Tunnelvisions', uri='spotify:artist:0IhfJZiFjHqE9mJ9INjp7x')], disc_no=1, length=359173, name='Culture Shock', track_no=4, uri='spotify:track:3hytDzYQ8TJ8BelUlBR8Ny'), Track(album=Album(artists=[Artist(name='Sub Focus', uri='spotify:artist:0QaSiI5TLA4N7mcsdxShDO')], name='Sub Focus', uri='spotify:album:1puaRzEhhLvXP17jUEGWb3'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Sub Focus', uri='spotify:artist:0QaSiI5TLA4N7mcsdxShDO')], disc_no=1, length=252853, name='Move Higher (feat. Culture Shock)', track_no=7, uri='spotify:track:2dPZcg8qPKpiBDJ5xkkz51'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='There for You (Edit)', uri='spotify:album:79E0BAGesSHmoa0ljmtX0H'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=204482, name='There for You (Edit)', track_no=1, uri='spotify:track:1bZxMKd0O9HGw82UeiKVZ7'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], name='Ik Gal (feat. Sunny Brown)', uri='spotify:album:1yB8q8ylwVDsBwbEQxpw6t'), artists=[Artist(name='Sunny Brown', uri='spotify:artist:5WjtMDHV7iUbAtMysxZ1AB'), Artist(name='Culture Shock', uri='spotify:artist:0Y9MLLehpG4J1ppfSXu0pk')], disc_no=1, length=171310, name='Ik Gal (feat. Sunny Brown)', track_no=1, uri='spotify:track:1jPfiAz1WmbvWhlDwrHdFc'), Track(album=Album(artists=[Artist(name='Moko', uri='spotify:artist:5zclpvahkJ29ftBuDpzrEU')], name='Your Love (Culture Shock Remix)', uri='spotify:album:0UB5suMvuwHOD0ktkqyamz'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Moko', uri='spotify:artist:5zclpvahkJ29ftBuDpzrEU')], disc_no=1, length=295172, name='Your Love - Culture Shock Remix', track_no=1, uri='spotify:track:0bIqKAN7gORdSyrBJ8tkOx'), Track(album=Album(artists=[Artist(name='TreeHouse!', uri='spotify:artist:71GpODupq5vjwvwXF06Vqz')], name='Full Immersion', uri='spotify:album:6DOJJhIt60n37kItUAytsM'), artists=[Artist(name='James Begin of Tropidelic', uri='spotify:artist:5Dh9xH161LGR2Szx3kBWvW'), Artist(name='TreeHouse!', uri='spotify:artist:71GpODupq5vjwvwXF06Vqz')], disc_no=1, length=281400, name='Culture Shock', track_no=2, uri='spotify:track:25hDc2v1Qzab7ApqapSUvj'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6zZYTWiIQEBe7ioLs7qyup')], name='Legal Tender 2.5', uri='spotify:album:5uqba2TfSuEFdC7Tf29Cih'), artists=[Artist(name='Sunny Brown', uri='spotify:artist:5WjtMDHV7iUbAtMysxZ1AB'), Artist(name='Culture Shock', uri='spotify:artist:6zZYTWiIQEBe7ioLs7qyup')], disc_no=1, length=242634, name='Beautiful', track_no=3, uri='spotify:track:1RRKSXiddMJ0BK1I5wL1qZ'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Visions', uri='spotify:album:1rFayernzczucYT7kjfeVZ'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=202068, name='Visions', track_no=1, uri='spotify:track:6RCj3fC9noAbICYFX6ieNY'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Renaissance (Edit)', uri='spotify:album:3RUI7eTdOuLeQJcDilWO6f'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=209549, name='Renaissance (Edit)', track_no=1, uri='spotify:track:5iZcCSEAg8e3CH20mXfS0q'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Renaissance (Edit)', uri='spotify:album:3RUI7eTdOuLeQJcDilWO6f'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=209549, name='Renaissance (Edit)', track_no=1, uri='spotify:track:6eVu4lMmOK0JF3Fk07he44'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='LSB', uri='spotify:artist:7M5ogsZnEm96Va8wLKvftN')], name='There for You (LSB Remix)', uri='spotify:album:0hUaDrgADLx4kpJbM9Nrjw'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='LSB', uri='spotify:artist:7M5ogsZnEm96Va8wLKvftN')], disc_no=1, length=353103, name='There for You (LSB Remix)', track_no=1, uri='spotify:track:6jLWsTbWniLvGEDSCQPin9'), Track(album=Album(artists=[Artist(name='Various Artists', uri='spotify:artist:0LyfQWJT6nXafLPZqxe9Of')], name='Drum&BassArena 2018', uri='spotify:album:5eUMDwLFf1FCmZTPlKl2la'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=281706, name='Bunker', track_no=7, uri='spotify:track:6ZfY0RhuYN9OmEgyQTHL9m'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Have It All / Pandemic', uri='spotify:album:3hhe4TEOzGEfgRTcRoP6HS'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Raphaella Mazaheri-Asadi', uri='spotify:artist:6MwQzllKf0MajkqMIgFoan')], disc_no=1, length=303194, name='Have It All (feat. Raphaella)', track_no=1, uri='spotify:track:6rZelIyIectqhY7qaOqDnF'), Track(album=Album(artists=[Artist(name='Various Artists', uri='spotify:artist:0LyfQWJT6nXafLPZqxe9Of')], name='Drum&BassArena 2018', uri='spotify:album:5eUMDwLFf1FCmZTPlKl2la'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=281706, name='Bunker', track_no=7, uri='spotify:track:3eSkTeRAXvPqtzmYxUnhKd'), Track(album=Album(artists=[Artist(name='Jinx', uri='spotify:artist:6561sPrPmJO7zhz8SZgM8B')], name='Culture Shock', uri='spotify:album:4kNAG32HtnX3VgdLIXCgIK'), artists=[Artist(name='Jinx', uri='spotify:artist:6561sPrPmJO7zhz8SZgM8B'), Artist(name='Bitti', uri='spotify:artist:3klVtgFPqW0r4wFtsHXaaC'), Artist(name='Sohail Salamat', uri='spotify:artist:72tkvQo3Xeor1E1nPvb4sm'), Artist(name='Jinx, Sohail Salamat & Bitti', uri='spotify:artist:1i7r1O3uQ3NBo74d0Kvdm4')], disc_no=1, length=278986, name='Gal Sun', track_no=7, uri='spotify:track:2eXBpNXoS24j968aEHN7nS'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Take Control', uri='spotify:album:56tUVhEvrYo9J3lPZzTy9v'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=298086, name='Take Control', track_no=1, uri='spotify:track:6x3rkMbvsR21hh9GhKE6s5'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Take Control', uri='spotify:album:56tUVhEvrYo9J3lPZzTy9v'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=298086, name='Take Control', track_no=1, uri='spotify:track:416Gg6xPcOnhbYKJzS35LQ'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='There for You (Edit)', uri='spotify:album:79E0BAGesSHmoa0ljmtX0H'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=204482, name='There for You (Edit)', track_no=1, uri='spotify:track:3soCVj63UaRqhBlS9W46yg'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='There for You (Edit)', uri='spotify:album:79E0BAGesSHmoa0ljmtX0H'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=204482, name='There for You (Edit)', track_no=1, uri='spotify:track:45ZQ63AIh8QJnLsusVHpZB'), Track(album=Album(artists=[Artist(name='Sub Focus', uri='spotify:artist:0QaSiI5TLA4N7mcsdxShDO')], name='Sub Focus', uri='spotify:album:1puaRzEhhLvXP17jUEGWb3'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Sub Focus', uri='spotify:artist:0QaSiI5TLA4N7mcsdxShDO')], disc_no=1, length=252853, name='Move Higher (feat. Culture Shock)', track_no=7, uri='spotify:track:5jjS9W5ah8rdXS1PSNzXau'), None, Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Transit EP', uri='spotify:album:3KRdZf7iqSDArCACqaW5NK'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Josh Parkinson', uri='spotify:artist:0ROQVBsPJtbUF13Bz5DgW2')], disc_no=1, length=284305, name='No More (Back to You) (Culture Shock vs. Josh Parkinson)', track_no=1, uri='spotify:track:7DP9YAnGjDdVhncIBMujTt'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='East Block', uri='spotify:album:7G1gpCoV9bXc7Kvp4GCqFQ'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=281390, name='East Block', track_no=1, uri='spotify:track:3S6o07Z8k4lWjDIjl5g5DQ'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='Get Physical', uri='spotify:album:1MdMpfgkUMrfe1TkMBQUWC'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=295386, name='Get Physical', track_no=1, uri='spotify:track:25L1z0XDYDtquFwhz9t7er'), Track(album=Album(artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], name='I Remember / Troglodyte', uri='spotify:album:0rfL0EECJAxoPY1HGVaH0v'), artists=[Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE')], disc_no=1, length=315953, name='Troglodyte', track_no=2, uri='spotify:track:7lU9T6Uluishdb3t0RFItq'), Track(album=Album(artists=[Artist(name='Camo & Krooked', uri='spotify:artist:2N8IPNZTiNo3nj4mreOlHU')], name='MOSAIK REMIXED', uri='spotify:album:5eKnogujRkuxGtHhXUEqWe'), artists=[Artist(name='NIHILS', uri='spotify:artist:0O7NhieDairfQvi9jr66Cx'), Artist(name='Culture Shock', uri='spotify:artist:6lp2VnIRXXpC9Wz7hSX6RE'), Artist(name='Camo & Krooked', uri='spotify:artist:2N8IPNZTiNo3nj4mreOlHU')], disc_no=1, length=253772, name='Broken Pieces (feat. Nihils) - Culture Shock Remix', track_no=1, uri='spotify:track:4X8EUAg0YlzpzvijUaq1Qo'), Track(album=Album(artists=[Artist(name='Jinx', uri='spotify:artist:6561sPrPmJO7zhz8SZgM8B')], name='Culture Shock', uri='spotify:album:4kNAG32HtnX3VgdLIXCgIK'), artists=[Artist(name='Jinx', uri='spotify:artist:6561sPrPmJO7zhz8SZgM8B'), Artist(name='Sohail Salamat', uri='spotify:artist:72tkvQo3Xeor1E1nPvb4sm'), Artist(name='Jinx & Sohail Salamat', uri='spotify:artist:6JZoZIZlp9YuMNE4NAYi33')], disc_no=1, length=253960, name='Akhian Udeek Diyan', track_no=1, uri='spotify:track:1FkB2GM6iWjfqa1ajfyavV')]
WARNING  2020-10-04 10:48:00,208 [6:Core-10] mopidy.core.library
  SpotifyBackend does not implement library.search() with "exact" support. Please upgrade it.
```

It would seem that the search is still returning the correct results but somehow the validation is failing. Other input (even with two or more strings in the array) returns the correct results. I have not found other input that would break search in this way. I would appreciate any pointers to fix this problem.


Discussion / hints:
Just to be clear on the mopidy version:

```
mopidy@d526d6de62f2:/$ mopidy config
INFO     2020-10-04 15:27:13,367 [1263:MainThread] mopidy.__main__
  Starting Mopidy 3.0.2
DEBUG    2020-10-04 15:27:13,372 [1263:MainThread] mopidy.ext
  Loading entry point: mopidy_bamp = mopidy_bamp:BAMPExtension
DEBUG    2020-10-04 15:27:13,583 [1263:MainThread] mopidy.ext
  Loaded extension: mopidy_bamp 0.1
DEBUG    2020-10-04 15:27:13,584 [1263:MainThread] mopidy.ext
  Loading entry point: file = mopidy.file:Extension
DEBUG    2020-10-04 15:27:13,585 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-File 3.0.2
DEBUG    2020-10-04 15:27:13,585 [1263:MainThread] mopidy.ext
  Loading entry point: http = mopidy.http:Extension
DEBUG    2020-10-04 15:27:13,585 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-HTTP 3.0.2
DEBUG    2020-10-04 15:27:13,585 [1263:MainThread] mopidy.ext
  Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    2020-10-04 15:27:13,585 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-M3U 3.0.2
DEBUG    2020-10-04 15:27:13,585 [1263:MainThread] mopidy.ext
  Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    2020-10-04 15:27:13,586 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-SoftwareMixer 3.0.2
DEBUG    2020-10-04 15:27:13,586 [1263:MainThread] mopidy.ext
  Loading entry point: stream = mopidy.stream:Extension
DEBUG    2020-10-04 15:27:13,586 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-Stream 3.0.2
DEBUG    2020-10-04 15:27:13,586 [1263:MainThread] mopidy.ext
  Loading entry point: spotify = mopidy_spotify:Extension
DEBUG    2020-10-04 15:27:13,587 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-Spotify 4.0.1
DEBUG    2020-10-04 15:27:13,587 [1263:MainThread] mopidy.ext
  Loading entry point: local = mopidy_local:Extension
DEBUG    2020-10-04 15:27:13,595 [1263:MainThread] mopidy.ext
  Loaded extension: Mopidy-Local 3.1.1
DEBUG    2020-10-04 15:27:13,596 [1263:MainThread] mopidy.ext
  Discovered extensions: mopidy_bamp, file, http, m3u, softwaremixer, stream, spotify, local
DEBUG    2020-10-04 15:27:13,597 [1263:MainThread] mopidy.config.keyring
  Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11)
INFO     2020-10-04 15:27:13,597 [1263:MainThread] mopidy.config
  Loading config from builtin defaults
DEBUG    2020-10-04 15:27:13,598 [1263:MainThread] mopidy.config
  Loading config from file:///etc/xdg/mopidy/mopidy.conf failed; it does not exist
INFO     2020-10-04 15:27:13,598 [1263:MainThread] mopidy.config
  Loading config from file:///config/mopidy.conf
INFO     2020-10-04 15:27:13,599 [1263:MainThread] mopidy.config
  Loading config from command line options
DEBUG    2020-10-04 15:27:13,604 [1263:MainThread] mopidy.ext
  Validating extension: mopidy_bamp
DEBUG    2020-10-04 15:27:13,614 [1263:MainThread] mopidy.ext
  Validating extension: file
DEBUG    2020-10-04 15:27:13,614 [1263:MainThread] mopidy.ext
  Validating extension: http
DEBUG    2020-10-04 15:27:13,614 [1263:MainThread] mopidy.ext
  Validating extension: m3u
DEBUG    2020-10-04 15:27:13,614 [1263:MainThread] mopidy.ext
  Validating extension: softwaremixer
DEBUG    2020-10-04 15:27:13,615 [1263:MainThread] mopidy.ext
  Validating extension: stream
DEBUG    2020-10-04 15:27:13,615 [1263:MainThread] mopidy.ext
  Validating extension: spotify
DEBUG    2020-10-04 15:27:13,637 [1263:MainThread] mopidy.ext
  Validating extension: local
INFO     2020-10-04 15:27:13,644 [1263:MainThread] mopidy.__main__
  Enabled extensions: spotify, local, mopidy_bamp, softwaremixer, file
INFO     2020-10-04 15:27:13,644 [1263:MainThread] mopidy.__main__
  Disabled extensions: stream, m3u, http
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 3
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
color = true
config_file =

[loglevels]
mopidy_spotify = warning
spotify = warning
tornado = warning
urllib3 = warning

[audio]
mixer = software
mixer_volume =
output = fakesink
buffer_time = 2000

[proxy]
scheme =
hostname =
port =
username =
password =

[mopidy_bamp]
enabled = true
hostname = 0.0.0.0
port = 6680
zeroconf = BAMP server on $hostname
allowed_origins =
csrf_protection = true
xheaders_enabled = false
cookie_secret = ********
ldap_uri = ********
ldap_schema = ********
downvotes_before_remove = 4
downvotes_difference_before_remove = 0
allow_vote_on_own_tracks = false
negative_scores_affect_ordering = false
seconds_before_replay_allowed = 28800
max_history_count = 500
max_alias_length = 30
slack_web_hook = ****************
build_hash = **************

[file]
enabled = true
media_dirs =
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions =
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = false  ; Extension disabled by user config.

[m3u]
enabled = false  ; Extension disabled by user config.

[softwaremixer]
enabled = true

[stream]
enabled = false  ; Extension disabled by user config.

[spotify]
enabled = true
username = *************
password = ********
client_id = *********
client_secret = ********
bitrate = 160
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[local]
enabled = true
media_dir = /var/lib/mopidy/media
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions =
excluded_file_extensions =
  .md
directories =
  Albums                  local:directory?type=album
  Artists                 local:directory?type=artist
  Composers               local:directory?type=artist&role=composer
  Genres                  local:directory?type=genre
  Performers              local:directory?type=artist&role=performer
  Release Years           local:directory?type=date&format=%25Y
  Tracks                  local:directory?type=track
  Last Week's Updates     local:directory?max-age=604800
  Last Month's Updates    local:directory?max-age=2592000
timeout = 10
use_artist_sortname = false
album_art_files =
  *.jpg
  *.jpeg
  *.png
``` 
Looking more into the results returned by the search, it seems that a None value has snuck in the results, and thus failing the validation of the entire collection. Is this a value expected to be returned from search?
It seems that the input is now returning a correct list of results, it might have been a Spotify blip. Still, it might be worth filtering out the Nones from the list before validation.

Fix patch:
diff --git a/mopidy_spotify/search.py b/mopidy_spotify/search.py
index 3caf81fb..c97b9bc0 100644
--- a/mopidy_spotify/search.py
+++ b/mopidy_spotify/search.py
@@ -77,6 +77,7 @@ def search(
         if "albums" in result
         else []
     )
+    albums = [x for x in albums if x]
 
     artists = (
         [
@@ -88,6 +89,7 @@ def search(
         if "artists" in result
         else []
     )
+    artists = [x for x in artists if x]
 
     tracks = (
         [
@@ -99,6 +101,7 @@ def search(
         if "tracks" in result
         else []
     )
+    tracks = [x for x in tracks if x]
 
     return models.SearchResult(
         uri=uri, albums=albums, artists=artists, tracks=tracks


Test patch:
diff --git a/tests/test_search.py b/tests/test_search.py
index ac03fbca..39d478b0 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -247,3 +247,31 @@ def test_exact_is_ignored(
     result2 = provider.search({"uri": ["spotify:track:abc"]}, exact=True)
 
     assert result1 == result2
+
+
+def test_search_filters_bad_results(
+    web_artist_mock, web_client_mock, web_search_mock, provider, caplog
+):
+    good_track = {
+        "uri": "spotify:track:good",
+        "type": "track",
+        "is_playable": True,
+    }
+    bad_track = {
+        "uri": "spotify:track:bad",
+        "type": "track",
+        "is_playable": False,
+    }
+    web_search_mock["albums"]["items"] = [good_track]
+    web_search_mock["artists"]["items"][0]["uri"] = None
+    web_search_mock["tracks"]["items"] = [{}, good_track, bad_track]
+    web_client_mock.get.return_value = web_search_mock
+    result = provider.search({"any": ["ABBA"]})
+
+    assert isinstance(result, models.SearchResult)
+    assert result.uri == "spotify:search:%22ABBA%22"
+
+    assert len(result.albums) == 0
+    assert len(result.artists) == 0
+    assert len(result.tracks) == 1
+    assert result.tracks[0].uri == "spotify:track:good"