-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
E.g. I tried to play the "Fields of Heather" mix from Austria and got the following response:
*** HTTP Error: (u'403 Client Error: Forbidden for url: https://8tracks.com/sets/536722025/play.json?mix_id=8345975', {u'status': u'403 Forbidden', u'notices': u'Due to international streaming restrictions, this playlist may have limited playback in your region.', u'errors': [u'Due to international streaming restrictions, this playlist may have limited playback in your region.'], u'api_version': 2, u'logged_in': False})
Which sucks but is to be expected. However orochi crashes on this, I think it should handle this response gracefully instead. I guess it should just print an error message (possibly just pass through the one from 8tracks) and not play the offending playlist.
Have a traceback for completeness' sake:
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/thomas/repos/external/orochi/orochi/client.py", line 872, in <module>
main()
File "/home/thomas/repos/external/orochi/orochi/client.py", line 862, in main
client.cmdloop()
File "/home/thomas/repos/external/orochi/orochi/client.py", line 216, in cmdloop
super(Client, self).cmdloop()
File "/usr/lib64/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib64/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/home/thomas/repos/external/orochi/orochi/client.py", line 434, in do_play
i.prompt = get_prompt(mix)
UnboundLocalError: local variable 'i' referenced before assignment
Reactions are currently unavailable