mopidy/mopidy — Issue #137: Error on MPD request with unmatched quotation marks
Author: jodal
Created: 2011-11-01 09:31:16+00:00
State: open
Labels: bugs, frontend-mpd

Mopidy rev 5c194b9c378ec3fc9f3bcb34d1915fa5f86d5735. Client is ncmpcpp 0.5.5-1 from Ubuntu 11.04.

```
DEBUG 2011-11-01 10:27:24,404 [11398:PykkaActorThread-10] mopidy.frontends.mpd
Request from [::ffff:127.0.0.1]:33509 to urn:uuid:fc25e8f7-4ac6-4d4e-8645-ceb6760d2e3e: list Date Artist "Anita Ward" Album "This Is Remixed Hits - Mashups & Rare 12" Mixes"
ERROR 2011-11-01 10:27:24,404 [11398:PykkaActorThread-10] pykka
Unhandled exception in MpdSession (urn:uuid:fc25e8f7-4ac6-4d4e-8645-ceb6760d2e3e):
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/pykka/actor.py", line 166, in _run
response = self._handle_receive(message)
File "/usr/lib/pymodules/python2.7/pykka/actor.py", line 246, in _handle_receive
return self.on_receive(message)
File "/home/jodal/dev/mopidy/mopidy/utils/network.py", line 336, in on_receive
self.on_line_received(line)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/__init__.py", line 88, in on_line_received
response = self.dispatcher.handle_request(line)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 51, in handle_request
return self._call_next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 72, in _call_next_filter
return next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 81, in _catch_mpd_ack_errors_filter
return self._call_next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 72, in _call_next_filter
return next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 92, in _authenticate_filter
return self._call_next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 72, in _call_next_filter
return next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 114, in _command_list_filter
response = self._call_next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 72, in _call_next_filter
return next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 142, in _idle_filter
response = self._call_next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 72, in _call_next_filter
return next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 156, in _add_ok_filter
response = self._call_next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 72, in _call_next_filter
return next_filter(request, response, filter_chain)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 169, in _call_handler_filter
response = self._format_response(self._call_handler(request))
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/dispatcher.py", line 177, in _call_handler
return handler(self.context, **kwargs)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/protocol/music_db.py", line 176, in list_
query = _list_build_query(field, mpd_query)
File "/home/jodal/dev/mopidy/mopidy/frontends/mpd/protocol/music_db.py", line 191, in _list_build_query
tokens = shlex.split(mpd_query.encode('utf-8'))
File "/usr/lib/python2.7/shlex.py", line 279, in split
return list(lex)
File "/usr/lib/python2.7/shlex.py", line 269, in next
token = self.get_token()
File "/usr/lib/python2.7/shlex.py", line 96, in get_token
raw = self.read_token()
File "/usr/lib/python2.7/shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation
DEBUG 2011-11-01 10:27:29,710 [11398:SpotifyThread] mopidy.backends.spotify.session_manager
System message: 09:27:29.710 I [offline-mgr:2115] 0 files unlocked. 0 images unlocked
DEBUG 2011-11-01 10:27:39,424 [11398:MainThread] mopidy.utils.server
Client most likely disconnected.
```