I tested today the library with the new Raspberry Pi Zero W and I get this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/gpiozero/pins/data.py", line 654, in pi_info
) = PI_REVISIONS[revision]
KeyError: 9437377
Thanks - this is a known issue. See this comment.
I intend to merge this PR and do a new release as soon as possible.
For now, the easiest way to get it working is:
git clone https://github.com/RPi-Distro/python-gpiozero
cd python-gpiozero
git checkout -b support_extra_models origin/support_extra_models
sudo python setup.py install
sudo python3 setup.py install
Then try again and it should work. Please let us know either way!
See #531 - we're hoping to get a new version released soon :-)
EDIT: Ooops, posted at the exact same time as Ben!
@lurch do my instructions look correct to you?
I think git checkout -b support_extra_models origin/support_extra_models can be reduced to just git checkout support_extra_models (the tracking-branch gets created automatically by git).
And I've never actually tested python setup.py install myself!
@driesdepoorter If you're not desparate, it might be easiest to just wait until the apt-get package gets updated, rather than having multiple versions of GpioZero installed.
Thank you for the quick fix @bennuttall
Maybe the code should be "fail-safe" and not crash if the Pi is not
detected or if the Pi revision is not detected.
Some sane default (on what pin are available) could be used in that case.
I mean, every new hardware release the problem seems to be the same.
Doing the change in advance would be a spoiler the foundation might not
want...
Doing it after might be difficult depending on Debian schedule and other.
Regards
2017-03-02 18:37 GMT+01:00 Dries Depoorter notifications@github.com:
Thank you for the quick fix @bennuttall https://github.com/bennuttall
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/RPi-Distro/python-gpiozero/issues/541#issuecomment-283723470,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASiRnBED-_7jvSoJzla1Gz0Cofymj4PWks5rhv5VgaJpZM4MRKoW
.
@dglaude see #530 ;-)
A fix has been released.
To update to v1.3.2:
sudo apt install python-gpiozero python3-gpiozero
Updated previous comment