skorokithakis/catt

Casting a YouTube playlist fails with an AttributeError

Closed this issue · 2 comments

Thanks for releasing catt, it's a nice tool. I had an issue with its most recent release on PyPI.

Running this:

$ catt -d my_device cast "https://www.youtube.com/playlist?list=PLjHf9jaFs8XVAQpJLdNNyA8tzhXzhpZHu"

Fails with this exception:

Traceback (most recent call last): 
  File "~/.pyenv/versions/3.10.1/bin/catt", line 8, in <module> 
    sys.exit(main())
<snip>
  File "~/.pyenv/versions/3.10.1/lib/python3.10/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "~/.pyenv/versions/3.10.1/lib/python3.10/site-packages/catt/cli.py", line 243, in cast
    if not random_play and cst.playlist_capability and stream.playlist_all_ids:
  File "~/.pyenv/versions/3.10.1/lib/python3.10/site-packages/catt/stream_info.py", line 143, in playlist_all_ids
    if self.is_playlist and self._entries and self._entries[0].get("id"):
AttributeError: 'str' object has no attribute 'get'. Did you mean: 'playlist_id'?

Versions:

$ python --version
Python 3.10.1

$ catt --version
catt v0.12.5, Zaniest Zapper.

This error might be related to #367.

Hm, yes, unfortunately I think this is related to #367, and so will take a bit of time to fix. I will see if I have some time to work on this, but PRs here are definitely appreciated.

I will close this as a duplicate for now, please discuss in #367.