Python3: can't open file 'HCSR04Test.py': [Errno 13] Permission denied

Hi All,

When tried to run the “distance1” snap (sudo snap run distance1) on another Raspberry PI, I got the below error.
python3: can’t open file ‘HCSR04Test.py’: [Errno 13] Permission denied

Please suggest.

Thanks & Regards,
Ashish

Did your HCSR04Test.py file has executable bit set?

Yes for HCSR04Test.py the executable bit is set, but still it gives same error.
Do I need to make the executable file of python program?

That shouldn’t be necessary