Skip to content

null track cause boom boom #5

Description

@jclerc

hi @foobuzz i've a new error for you

Traceback (most recent call last):
  File "/home/pi/.local/bin/statify", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 36, in
    code = _main(args)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 100, in
    pull_playlists(spotify, database)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 171, in
    spotify_tracks = list(spotify.playlist_tracks(playlist_obj.spotify_id))
  File "/home/pi/.local/lib/python3.7/site-packages/statify/spotify_client.py", line
    p_track['track'] = self.track_transformer(p_track['track'])
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 145, in
    if resource['id'] is None and resource['is_local']:
TypeError: 'NoneType' object is not subscriptable

i added a print somewhere and after dumping a lot of stuff, it happened:

{'added_at': '2021-05-06T22:15:57Z', 'added_by': {'external_urls': {'spotify': 'https://open.spotify.com/user/'}, 'href': 'https://api.spotify.com/v1/users/', 'id': '', 'type': 'user', 'uri': 'spotify:user:'}, 'is_local': False, 'primary_color': None, 'track': None, 'video_thumbnail': {'url': None}}

so after a huge amount of reverse engineering and using the web ui of github i'll make a pr in the next few minutes, stay tuned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions