bjarneo / Pytify

A CLI application for controlling Spotify
MIT License
743 stars 40 forks source link

Exception after searching #34

Closed dstollie closed 7 years ago

dstollie commented 7 years ago

Ive install python using brew on mac osx:

$ brew install python

This install python 2.7

Next I install pytify and I run the pytify command. After I type in a search keyword im getting the following exception

 ~  pytify
pytify 3.3.2 [https://github.com/bjarneo/Pytify]
dennisstolmeijer@Denniss-MacBook-Pro-2.local - Search:
> kensington
Traceback (most recent call last):
  File "/usr/local/bin/pytify", line 9, in <module>
    load_entry_point('pytify==3.3.2', 'console_scripts', 'pytify')()
  File "/usr/local/lib/python2.7/site-packages/pytify/cli.py", line 85, in main
    App()
  File "/usr/local/lib/python2.7/site-packages/pytify/cli.py", line 19, in __init__
    self.run()
  File "/usr/local/lib/python2.7/site-packages/pytify/cli.py", line 61, in run
    self.interaction()
  File "/usr/local/lib/python2.7/site-packages/pytify/cli.py", line 80, in interaction
    self.list_songs(list=self.pytify.list())
  File "/usr/local/lib/python2.7/site-packages/pytify/cli.py", line 22, in list_songs
    SongList(list)
  File "/usr/local/lib/python2.7/site-packages/pytify/song_list.py", line 37, in __init__
    curses.wrapper(self.display)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/site-packages/pytify/song_list.py", line 79, in display
    stdscr.addstr(index, 1, str(item), mode)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 37: ordinal not in range(128)

Help needed :)

Thanks

bjarneo commented 7 years ago

Hi @dstollie

Can you try to install python 3 and try again? :)

Pytify don't support python 2. Except an old version https://github.com/bjarneo/Pytify/tree/v2.1.0

AntoineLelaisant commented 7 years ago

Hi !

Yes, use python3 instead of 2 solved the problem for me :)

Thanks :+1:

bjarneo commented 7 years ago

Awesome!