Giter Site home page Giter Site logo

Comments (3)

rawdlite avatar rawdlite commented on August 29, 2024

I do see the same error.
This is a search for {"artist": ["Björk"]}

File "/home/tom/projects/audio/mopidy/local/lib/python2.7/site-packages/pykka/actor.py", line 294, in _handle_receive
return callee(_message['args'], *_message['kwargs'])
File "/home/tom/projects/audio/mopidy/local/lib/python2.7/site-packages/mopidy_soundcloud/library.py", line 177, in search
tracks=self.backend.remote.search(search_query)
File "/home/tom/projects/audio/mopidy/local/lib/python2.7/site-packages/mopidy_soundcloud/soundcloud.py", line 212, in search
quote_plus(query)
File "/usr/lib/python2.7/urllib.py", line 1295, in quote_plus
return quote(s, safe)
File "/usr/lib/python2.7/urllib.py", line 1288, in quote
return ''.join(map(quoter, s))
KeyError: u'\xf6'

Unfortunately this breaks searching for the other backends.

from mopidy-soundcloud.

rawdlite avatar rawdlite commented on August 29, 2024

This patch fixes the error for me.

--- mopidy_soundcloud/library.py.org    2014-12-30 08:14:25.996540248 +0100
+++ mopidy_soundcloud/library.py        2014-12-30 08:02:29.035486060 +0100
@@ -170,7 +170,7 @@
                     tracks=self.backend.remote.resolve_url(search_query)
                 )
         else:
-            search_query = ' '.join(query.values()[0])
+            search_query = ' '.join(query.values()[0]).encode('utf8')
             logger.info('Searching SoundCloud for \'%s\'', search_query)
             return SearchResult(
                 uri='soundcloud:search',

@lfcipriani , if you can verify this i can do a pull request.
Also i am not sure whether the search only using the first key value is the best approach.

from mopidy-soundcloud.

jodal avatar jodal commented on August 29, 2024

This was fixed by PR #55.

In related news, with the upcoming Mopidy 1.1, broken search in a single backend should no longer break search for other backends.

from mopidy-soundcloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.