dbrgn / orochi

Orochi is an interactive command line client for 8tracks.com.
GNU General Public License v3.0
84 stars 17 forks source link

search_tags fails #70

Closed satreix closed 8 years ago

satreix commented 8 years ago

I started using orochi today but I noticed (using py3.5) that the search_tags command seems not to work as advertised:

(8tracks)> search_tags night, sleep
Traceback (most recent call last):
  File ".../venv/bin/orochi", line 11, in <module>
    sys.exit(main())
  File ".../venv/lib/python3.5/site-packages/orochi/client.py", line 748, in main
    client.cmdloop()
  File ".../venv/lib/python3.5/site-packages/orochi/client.py", line 178, in cmdloop
    super(Client, self).cmdloop()
  File "/usr/lib/python3.5/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.5/cmd.py", line 217, in onecmd
    return func(arg)
  File ".../venv/lib/python3.5/site-packages/orochi/client.py", line 230, in do_search_tags
    mixes = self.search_request(s, 'tag')
  File ".../venv/lib/python3.5/site-packages/orochi/client.py", line 436, in search_request
    self.config['results_sorting'], self._search_results_page, self._results_per_page)
  File ".../venv/lib/python3.5/site-packages/orochi/api.py", line 162, in search_mix
    if len(tags) < 1:
TypeError: object of type 'filter' has no len()

I recon the issue comes from around here: https://github.com/dbrgn/orochi/blob/master/orochi/api.py#L164

dbrgn commented 8 years ago

I can confirm that, it's probably a leftover from the Python 3 port (#59). Thanks a lot for the report!

dbrgn commented 8 years ago

This should fix it.

dbrgn commented 8 years ago

Thanks @satreix for reporting. I'll do a new minor release soon.