Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when starting daemon #155

Closed
txoof opened this issue Mar 12, 2024 · 3 comments
Closed

crash when starting daemon #155

txoof opened this issue Mar 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@txoof
Copy link
Owner

txoof commented Mar 12, 2024

Start daemon with sudo systemctl restart paperpi -- setting up display fails miserably; looks like there's a permission problem with /dev/spidev0.0

Mar 12 21:40:41 lroom-b64 paperpi[2676]: 21:40:41 paperpi :main      :655 :INFO       - ********** PaperPi 0.5.6.0 RGB Starting **********
Mar 12 21:40:41 lroom-b64 paperpi[2676]: 21:40:41 paperpi :main      :657 :INFO       - PaperPi is running in daemon mode
Mar 12 21:40:41 lroom-b64 paperpi[2676]: /usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/IT8951/interface.py:28: RuntimeWarning: No channels have been set up yet - nothing to clean up!  Try cleaning up at the end of your program instead!
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   self.spi = SPI(**spi_kwargs)
Mar 12 21:40:41 lroom-b64 paperpi[2676]: 21:40:41 paperpi :setup_display:415 :CRITICAL   - Error initializing EPD: [Errno 13] Permission denied: '/dev/spidev0.0'
Mar 12 21:40:41 lroom-b64 paperpi[2676]: Traceback (most recent call last):
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/paperpi.py", line 407, in setup_display
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     screen = Screen(epd=epd, vcom=vcom)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/epdlib/Screen.py", line 240, in __init__
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     self.epd = epd
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     ^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/epdlib/Screen.py", line 63, in new_f
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     return f(self, *args, **kwds)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:            ^^^^^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/epdlib/Screen.py", line 330, in epd
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     myepd = self._load_hd(epd)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:             ^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/epdlib/Screen.py", line 436, in _load_hd
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     myepd = AutoEPDDisplay(vcom=self.vcom)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/IT8951/display.py", line 215, in __init__
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     epd = EPD(vcom=vcom, bus=bus, device=device, data_hz=spi_hz)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages/IT8951/interface.py", line 28, in __init__
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     self.spi = SPI(**spi_kwargs)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:                ^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "src/IT8951/spi.pyx", line 52, in IT8951.spi.SPI.__cinit__
Mar 12 21:40:41 lroom-b64 paperpi[2676]: PermissionError: [Errno 13] Permission denied: '/dev/spidev0.0'
Mar 12 21:40:41 lroom-b64 paperpi[2676]: During handling of the above exception, another exception occurred:
Mar 12 21:40:41 lroom-b64 paperpi[2676]: Traceback (most recent call last):
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/paperpi.py", line 746, in <module>
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     exit_code = main()
Mar 12 21:40:41 lroom-b64 paperpi[2676]:                 ^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/paperpi.py", line 668, in main
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     screen_return = setup_display(config)
Mar 12 21:40:41 lroom-b64 paperpi[2676]:                     ^^^^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]:   File "/usr/local/paperpi/paperpi.py", line 416, in setup_display
Mar 12 21:40:41 lroom-b64 paperpi[2676]:     logging.critical(f'The user executing {constants.app_name} does not have access to the SPI device.')
Mar 12 21:40:41 lroom-b64 paperpi[2676]:                                            ^^^^^^^^^^^^^^^^^^
Mar 12 21:40:41 lroom-b64 paperpi[2676]: AttributeError: module 'my_constants' has no attribute 'app_name'
Mar 12 21:40:42 lroom-b64 systemd[1]: paperpi-daemon.service: Deactivated successfully.
Mar 12 21:40:42 lroom-b64 systemd[1]: paperpi-daemon.service: Consumed 1.155s CPU time.
@txoof txoof added the bug Something isn't working label Mar 12, 2024
@txoof
Copy link
Owner Author

txoof commented Mar 12, 2024

looks like this is a groups issue
https://forums.raspberrypi.com/viewtopic.php?t=141013

@txoof
Copy link
Owner Author

txoof commented Mar 12, 2024

Install script needs to add paperpi user to spi and gpio groups:

$ usermod paperpi -a -G spi,gpio

@txoof txoof mentioned this issue Mar 13, 2024
@txoof
Copy link
Owner Author

txoof commented Mar 13, 2024

resolved in #156

@txoof txoof closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant