Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ulises

ulises/light.py Secret

Created August 19, 2016 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ulises/16fc476a4a2610a0e854841ddb740239 to your computer and use it in GitHub Desktop.
Save ulises/16fc476a4a2610a0e854841ddb740239 to your computer and use it in GitHub Desktop.
pi@hydro-pi-0:~ $ python [222/1776]
Python 2.7.9 (default, Mar 8 2015, 00:52:26)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import flotilla
>>> c = flotilla.Client()
>>> c.available
{'four': <flotilla.light.Light instance at 0xb699ad78>, 'five': <flotilla.wea}
>>> l = c['four']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: Client instance has no attribute '__getitem__'
>>> Exception in thread Thread-30:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-armv6l/egg/flotilla/__init__.py", line 322, in _hand
channel_index = self._channel_number_to_index(channel)
File "build/bdist.linux-armv6l/egg/flotilla/__init__.py", line 336, in _chax
return [-1,7,6,5,4,3,2,1,0][channel_number]
IndexError: list index out of range
Exception in thread Thread-32:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-armv6l/egg/flotilla/__init__.py", line 320, in _hand
channel = int(data.pop(0).strip())
ValueError: invalid literal for int() with base 10: 'eil:020004761890'
Exception in thread Thread-35:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-armv6l/egg/flotilla/__init__.py", line 320, in _hand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment