DanNixon / PlayMusicCL

A command line client for Google Play Music
Apache License 2.0
135 stars 21 forks source link

KeyError: 'trackNumber' #17

Closed jgottwig closed 10 years ago

jgottwig commented 10 years ago

Very excited by this tool. Here's an error I'm getting, and I'm hoping someone might have an idea of what I might be getting wrong. I'm running on the latest Ubuntu. I have All Access, if that makes any difference.

Logging in to Google Play Music...
Creating GStreamer player...
Updating local library from Google Play Music...
Traceback (most recent call last):
  File "/usr/local/bin/playmusiccl", line 9, in <module>
    load_entry_point('playmusiccl==0.5.3', 'console_scripts', 'playmusiccl')()
  File "/usr/local/lib/python2.7/dist-packages/playmusiccl-0.5.3-py2.7.egg/playmusiccl/__init__.py", line 7, in run main()
  File "/usr/local/lib/python2.7/dist-packages/playmusiccl-0.5.3-py2.7.egg/playmusiccl/playmusiccl.py", line 648, in main
    __MusicClient__.update_local_lib()
  File "/usr/local/lib/python2.7/dist-packages/playmusiccl-0.5.3-py2.7.egg/playmusiccl/playmusiccl.py", line 100, in update_local_lib
    sorted_album = sorted(self.library[artist][album], key=lambda k: k['trackNumber'])
  File "/usr/local/lib/python2.7/dist-packages/playmusiccl-0.5.3-py2.7.egg/playmusiccl/playmusiccl.py", line 100, in <lambda>
sorted_album = sorted(self.library[artist][album], key=lambda k: k['trackNumber'])
KeyError: 'trackNumber'

Thanks so much

DanNixon commented 10 years ago

I'll try and get this fixed tonight. It is a pretty glaring oversight and I'm surprised I've never had this error before.

DanNixon commented 10 years ago

This should be fixed now, and pushed to pip (along with the fix for #15)

jgottwig commented 10 years ago

Excellent. I'll test this out soon.