Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Python • Re: scripts not running

$
0
0
Looks like you are trying to access a file on an external usb drive?

Looks like a python module the OP's code requires (lgpio.py) is trying to do that not the OP's code. It further looks like the partition has been mounted by the desktop's automounter and that the pwd or venv directory at runtime is /media/pi/USB2.

Cause could be anything but if I were to guess, I'd guess that either the mount has gone away between the code starting and lgpio doing its init or the code is being run as a user other than pi or root.

Oh, and it also looks like there is an error on line 1 of the OP's code. There shouldn't be a space between RPi and .GPIO. Same on line 4 after GPIO.

What's also interesting is that their code doesn't appear to import the module that is producing the error. And that RPi.GPIO is know to not work on a PI5.

Assuming RPiOS Bookworm but OP didn't say nor have they said if their scripts were previously running on a Pi5 and what changed between them running and not.

Statistics: Posted by thagrol — Sat Aug 02, 2025 8:27 pm



Viewing all articles
Browse latest Browse all 7503

Trending Articles