pimoroni / explorer-hat

Python library for Explorer HAT
https://shop.pimoroni.com/products/explorer-hat
MIT License
163 stars 60 forks source link

Product ID not supported Explorer pHAT #42

Closed clemfernandez closed 4 years ago

clemfernandez commented 6 years ago

I get this error when I try to import explorerhat in python2. Python3 version does work fine though.

Python 2.7.9 (default, Sep 17 2016, 20:26:04) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import explorerhat as eh
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/explorerhat/__init__.py", line 703, in <module>
    _cap1208 = Cap1208()
  File "/usr/lib/python2.7/dist-packages/cap1xxx.py", line 286, in __init__
    raise Exception("Product ID {} not supported!".format(self.product_id))
Exception: Product ID -5 not supported!
pi@fool:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie
pi@fool:~ $ uname -a
Linux fool 4.4.34+ #930 Wed Nov 23 15:12:30 GMT 2016 armv6l GNU/Linux
Gadgetoid commented 6 years ago

-5 is a new one! Yikes.

Try updating the library with sudo pip install cap1xxx --upgrade