samtherussell / squeezebox-controller

A python interface for controlling Logitech Squeezeboxes via the SqueezeboxServer
MIT License
14 stars 10 forks source link

UnboundLocalError in Version 1.02 #5

Open pmendiuk opened 4 years ago

pmendiuk commented 4 years ago

I was previously running 0.15.4 without issue and just installed the version 1.02 which has the following errors:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/squeezebox_controller/__init__.py", line 17, in cached_                                           f
    return f(self, details, *args)
  File "/home/pi/.local/lib/python3.7/site-packages/squeezebox_controller/__init__.py", line 42, in needs_p                                           layer_f
    return f(self, details, *args)
  File "/home/pi/.local/lib/python3.7/site-packages/squeezebox_controller/__init__.py", line 122, in simple                                           _command
    self._make_request(self.player_macs[details['player']], commands[command]['command'])
UnboundLocalError: local variable 'command' referenced before assignment
samtherussell commented 4 years ago

Sorry about that, I had released it before I had checked it over (test pipeline was still failing even :-/) I've pushed a new release now, with the fix. The idea now is that you can use the uppercase codes or some english phrases (I'm trying to hook it in to Mycroft AI personal assistant). Anyway, let me know if there's anything else.