When search with unicode character error occurs

When I write “긱스” cause error.

If i write like this “%EA%B8%B1%EC%8A%A4” no problem.

I think have to url encode before send query.

error message

Server returned error: Object {message: “Application error”, code: 0, data: Object}code: 0data: Objectmessage: "u’\uae31’"traceback: "Traceback (most recent call last):↵ File “/usr/local/lib/python2.7/dist-packages/mopidy/utils/jsonrpc.py”, line 130, in _handle_single_request↵ result = self._unwrap_result(result)↵ File “/usr/local/lib/python2.7/dist-packages/mopidy/utils/jsonrpc.py”, line 219, in _unwrap_result↵ result = result.get()↵ File “/usr/lib/python2.7/dist-packages/pykka/future.py”, line 299, in get↵ exec(‘raise exc_info[0], exc_info[1], exc_info[2]’)↵ File “/usr/lib/python2.7/dist-packages/pykka/actor.py”, line 200, in _actor_loop↵ response = self._handle_receive(message)↵ File “/usr/lib/python2.7/dist-packages/pykka/actor.py”, line 294, in _handle_receive↵ return callee(*message[‘args’], **message[‘kwargs’])↵ File “/usr/local/lib/python2.7/dist-packages/mopidy/core/library.py”, line 195, in search↵ return [result for result in pykka.get_all(futures) if result]↵ File “/usr/lib/python2.7/dist-packages/pykka/future.py”, line 330, in get_all↵ return [future.get(timeout=timeout) for future in futures]↵ File “/usr/lib/python2.7/dist-packages/pykka/future.py”, line 299, in get↵ exec(‘raise exc_info[0], exc_info[1], exc_info[2]’)↵ File “/usr/lib/python2.7/dist-packages/pykka/actor.py”, line 200, in _actor_loop↵ response = self._handle_receive(message)↵ File “/usr/lib/python2.7/dist-packages/pykka/actor.py”, line 294, in _handle_receive↵ return callee(*message[‘args’], **message[‘kwargs’])↵ File “/usr/local/lib/python2.7/dist-packages/mopidy_soundcloud/library.py”, line 177, in search↵ tracks=self.backend.remote.search(search_query)↵ File “/usr/local/lib/python2.7/dist-packages/mopidy_soundcloud/soundcloud.py”, line 212, in search↵ quote_plus(query)↵ File “/usr/lib/python2.7/urllib.py”, line 1275, in quote_plus↵ return quote(s, safe)↵ File “/usr/lib/python2.7/urllib.py”, line 1268, in quote↵ return ‘’.join(map(quoter, s))↵KeyError: u’\uae31’↵"type: "KeyError"proto: Objectmessage: "Application error"proto: Object
mopidy.min.js:5 Potentially unhandled rejection [30] TypeError: Illegal invocation
at D (http://192.168.2.100/mopidy/mopidy.min.js:5:13744)
at t.when (http://192.168.2.100/mopidy/mopidy.min.js:5:17574)
at n.run (http://192.168.2.100/mopidy/mopidy.min.js:5:16042)
at b._drain (http://192.168.2.100/mopidy/mopidy.min.js:5:19207)
at drain (http://192.168.2.100/mopidy/mopidy.min.js:5:18795)
at http://192.168.2.100/mopidy/mopidy.min.js:5:3177

looks like a a mopidy-soundcloud error. I would file a bug against that project.

This has been reported half a year ago.
https://github.com/mopidy/mopidy-soundcloud/issues/42

I offered a patch that works for me but got no feedback yet.
Maybe you could try my patch and report back.

Hmm, must have gotten lost. If you could send a PR I’m sure we could get this merged as the plugin is under the Mopidy org and we should have enough access to get things moving :slight_smile:

OK, just did a PR.
https://github.com/mopidy/mopidy-soundcloud/pull/55