inky icon indicating copy to clipboard operation
inky copied to clipboard

Impression library not working on Jessie

Open hardillb opened this issue 4 years ago • 1 comments

Installed via the one line curl/bash script.

Fully updated Jessie install (yes, I know i should upgrade, but it's the pi zero I had to hand that I've been using with the inkey pHat & the script does say it's supported...)

Running any of the examples/7color code gives the following error:

$ ./clear.py 
Traceback (most recent call last):
  File "./clear.py", line 14, in <module>
    inky.show()
  File "/usr/local/lib/python3.4/dist-packages/inky/inky_uc8159.py", line 365, in show
    self._update(buf.astype('uint8').tolist(), busy_wait=busy_wait)
  File "/usr/local/lib/python3.4/dist-packages/inky/inky_uc8159.py", line 320, in _update
    self.setup()
  File "/usr/local/lib/python3.4/dist-packages/inky/inky_uc8159.py", line 217, in setup
    self._spi_bus.no_cs = True
AttributeError: 'SpiDev' object has no attribute 'no_cs'

I've tried running with python 3.4.2 and 2.4.7

It looks like the required version of python3-spidev is installed:

aptitude show python3-spidev 
Package: python3-spidev                  
State: installed
Automatically installed: no
Version: 2.0~git20150907
Priority: optional
Section: python
Maintainer: Stephen Caudle <[email protected]>
Architecture: armhf
Uncompressed Size: 56.3 k
Depends: python3 (< 3.5), python3 (>= 3.4~), libc6 (>= 2.4)
Description: Python bindings for Linux SPI access through spidev (Python 3)
 Python module for interfacing with SPI devices from user space via the spidev
 linux kernel driver.
Homepage: https://github.com/doceme/py-spidev
$ grep spidev inky.sh
SPIDEV3="python3-spidev_2.0~git20150907_armhf.deb"
...

Looks like no_cs was added in 2016 so after the 20150907 build available on Jessie.

Happy for this not to be fixed for Jessie if it's not simple, the right answer might be to say that Jessie is not supported.

hardillb avatar Dec 05 '20 21:12 hardillb

Yeah I think supporting Jessie now might be a bit of a Stretch, Buster! I'm already in such a Squeeze I'm getting Wheezy

Sorry.

Might be worth grabbing the source, editing out the no_cs and seeing if it works for you. All my Pi's are packed in moving boxes to say nothing of digging out something so ancient. It might be possible to trap this error and just skip "no_cs".

Gadgetoid avatar Jan 29 '21 16:01 Gadgetoid