Page 1 of 1

not finding inkyphat on buster

Posted: Sun Jul 07, 2019 1:02 pm
by tpyo kingg
I have a script I've brought over from stretch to buster. However, it is not finding the inkyphat module in buster. The module can't be found manually either: Below is the result of using the python3 interpreter to try to import the module alone.

Where have I taken a wrong turn?

Code: Select all

$ head -n 1 /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"

$ apt-cache policy python3-inkyphat | head -n 3
python3-inkyphat:
  Installed: 1.0.1
  Candidate: 1.0.1
 
$ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inkyphat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/inkyphat/__init__.py", line 24, in <module>
    _panel = inky212x104.Inky212x104(resolution=(HEIGHT, WIDTH), h_flip=False, v_flip=True)
  File "/usr/lib/python3/dist-packages/inkyphat/inky212x104.py", line 111, in __init__
    self._spi.open(0, self.cs_pin)
FileNotFoundError: [Errno 2] No such file or directory
>>> 

Re: not finding inkyphat on buster

Posted: Sun Jul 07, 2019 1:28 pm
by ghp
The error message does not say something like 'module not found'.
Did you enable SPI on the new distribution, use "sudo raspi-config" for this.

Re: not finding inkyphat on buster

Posted: Sun Jul 07, 2019 1:35 pm
by tpyo kingg
ghp wrote:
Sun Jul 07, 2019 1:28 pm
The error message does not say something like 'module not found'.
Did you enable SPI on the new distribution, use "sudo raspi-config" for this.
D'oh. That was it. I have now added "enable SPI" to my notes on backup / restore for that program.

Thanks.