bonjour
j’essaie d’automatiser le lancement d’un script python au reboot.
il plante ligne 22 :
import vlc
import time
import board
from time import strftime
from PIL import Image, ImageDraw,ImageFont
import configparser
import RPi.GPIO as GPIO
import sys
from time import sleep
import digitalio
import adafruit_ssd1306
import evdev
from datetime import datetime
volume_ini=100
time_var=""
date_var=""
row_list=[23,24,25]
col_list=[4,5,6]
GPIO.setmode(GPIO.BCM)
for pin in row_list:
GPIO.setup(pin,GPIO.OUT)
le service systemd :
[Unit]
After=multi-user.target
[Service]
type=oneshot
User=pierre
Execstart= /usr/bin/python /home/pierre/Documents/toto.py
[Install]
WantedBy=custom.target
L’erreur :
GPIO.setup(pin,GPIO.OUT)
RuntimeError: No access to /dev/mem/ Try running as root !
en root , il plante à cause des path: ne trouve pas la lib board