epd_display icon indicating copy to clipboard operation
epd_display copied to clipboard

add better handling when IT8951 driver cannot be reached at init and possibly during run time

Open txoof opened this issue 3 years ago • 1 comments

When the driver board cannot be reached:

Traceback (most recent call last):
  File "paperpi/paperpi.py", line 658, in <module>
  File "paperpi/paperpi.py", line 620, in main
  File "paperpi/paperpi.py", line 346, in setup_display
  File "epdlib/Screen.py", line 195, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 259, in epd
  File "epdlib/Screen.py", line 417, in _epd_hd
  File "IT8951/display.py", line 219, in __init__
  File "IT8951/interface.py", line 33, in __init__
  File "IT8951/interface.py", line 103, in update_system_info

related to Issue #3

txoof avatar Jul 04 '21 17:07 txoof

Complete traceback at startup:

21:19:57 paperpi:main:801:INFO - ********** PaperPi 0.2.11.1 Starting **********
21:19:57 Screen:_load_hd:399:DEBUG - configuring IT8951 epd
Traceback (most recent call last):
  File "paperpi.py", line 859, in <module>
    exit_code = main()
  File "paperpi.py", line 804, in main
    screen_return = setup_display(config)
  File "paperpi.py", line 300, in setup_display
    screen = Screen(epd=epd, vcom=vcom)
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/epdlib/Screen.py", line 226, in __init__
    self.epd = epd
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/epdlib/Screen.py", line 38, in new_f
    return f(self, *args, **kwds)
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/epdlib/Screen.py", line 316, in epd
    myepd = self._load_hd(epd)
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/epdlib/Screen.py", line 406, in _load_hd
    myepd = AutoEPDDisplay(vcom=self.vcom)
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/IT8951/display.py", line 219, in __init__
    epd = EPD(vcom=vcom, bus=bus, device=device, data_hz=spi_hz)
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/IT8951/interface.py", line 33, in __init__
    self.update_system_info()
  File "/home/pi/.local/share/virtualenvs/epd_display-ApAYs8Kw/lib/python3.7/site-packages/IT8951/interface.py", line 103, in update_system_info
    raise RuntimeError("communication with device failed")
RuntimeError: communication with device failed

txoof avatar Oct 04 '21 19:10 txoof