(classic)bak009@localhost:/test-bak$ sudo snap run test-bak
error: cannot find current revision for snap test-bak: readlink /snap/test-bak/current: no such file or directory
Can you please use triple backticks before and after each code paste so that formatting and indentation is correct? Triple backticks are ``` and indicate “code”.
Have you successfully built your snap with snapcraft and then installed it with snap install test-bak_0.1_armhf.snap --dangerous? Were there any errors during this process?
The message that /snap/test-bak/current does not exist suggests that you haven’t installed your snap yet.
#!/usr/bin/env python3
import RPi.GPIO as GPIO
import time
# Set up PIN 0 as output
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(0, GPIO.OUT)
on = True
# Every second toggle output
while True:
print ("Running")
GPIO.output(0, on)
on = not on
time.sleep(1)
I installed it with this command snap install test-bak_0.1_armhf.snap. There were no errors during build process. The following message is shown when I am running classic:
(classic)bak009@localhost:/test-bak$ snap run test-bak
error: cannot find current revision for snap test-bak: readlink /snap/test-bak/current: no such file or directory
and when running in normal mode it gives the following message:
bak009@localhost:~$ snap run test-bak
python3: can’t open file ‘test-bak.py’: [Errno 2] No such file or directory
Am I defining the right path. Because test-bak is in this path /test-bak when running in classic mode but when in normal mode this path does not show