Klipper-WS281x_LED_Status icon indicating copy to clipboard operation
Klipper-WS281x_LED_Status copied to clipboard

Permission Denied ???

Open Gnizten opened this issue 2 years ago • 10 comments

I´m abaut to install LED Status on klipper, i reached git clone [email protected]:11chrisadams11/Klipper-WS281x_LED_Status.git Cloning into 'Klipper-WS281x_LED_Status'...

I get this error.

The authenticity of host 'github.com (140.82.121.3)' can't be established. ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts. [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I cannot see the file on your resposity on Git.

BR Tom

Gnizten avatar Jun 03 '22 07:06 Gnizten

Sorry, I added the incorrect command there. It should be git clone https://github.com/11chrisadams11/Klipper-WS281x_LED_Status.git to not require a key. I will get the readme updated. Thanks for pointing it out.

11chrisadams11 avatar Jun 03 '22 22:06 11chrisadams11

Thanks, that helped a lot for that matter, But now to the next challenge... :-)

Jun 4 11:35:23 LunaMath3D systemd[1]: Reloading. Jun 4 11:35:26 LunaMath3D systemd[1]: Started Simplified Python Klipper LED Strip Service. Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: Can't open /dev/mem: Permission denied Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: Traceback (most recent call last): Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: File "/home/pi/Klipper-WS281x_LED_Status.git/klipper_ledstrip.py", line 167, in Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: run() Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: File "/home/pi/Klipper-WS281x_LED_Status.git/klipper_ledstrip.py", line 50, in run Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: strip.begin() Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: File "/usr/local/lib/python3.7/dist-packages/rpi_ws281x/rpi_ws281x.py", line 131, in begin Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp)) Jun 4 11:35:27 LunaMath3D klipper_ledstrip.py[1600]: RuntimeError: ws2811_init failed with code -5 (mmap() failed) Jun 4 11:35:27 LunaMath3D systemd[1]: ledstrip.service: Main process exited, code=killed, status=11/SEGV Jun 4 11:35:27 LunaMath3D systemd[1]: ledstrip.service: Failed with result 'signal'.

Gnizten avatar Jun 04 '22 09:06 Gnizten

Is the SPI interface enabled on your Pi? https://www.raspberrypi-spy.co.uk/2014/08/enabling-the-spi-interface-on-the-raspberry-pi/

I might need to add that to the instructions as well.

11chrisadams11 avatar Jun 04 '22 16:06 11chrisadams11

yes, Because i use SPI for my Accelerometer

Gnizten avatar Jun 04 '22 17:06 Gnizten

I think its something related to permissions, because i can start manual with SUDO

Gnizten avatar Jun 04 '22 17:06 Gnizten

I have the same problem. I can start it with sudo and without I got permission denied. The Status led started with sudo. I tried it with gpio 10 and 18 and there wasn't any difference.

If I use the macro buttons then I got this error

20:21:44 Command {status_led} finished 20:21:44 FileNotFoundError: [Errno 2] No such file or directory: 'settings_sample.conf' 20:21:44 run() File "/home/pi/Klipper-WS281x_LED_Status/klipper_ledstrip.py", line 35, in run settings = get_settings() File "/home/pi/Klipper-WS281x_LED_Status/klipper_ledstrip.py", line 27, in get_settings with open('settings_sample.conf', 'r') as sample_settings_file: 20:21:44 Traceback (most recent call last): File "/home/pi/Klipper-WS281x_LED_Status/klipper_ledstrip.py", line 18, in get_settings with open('settings.conf', 'r') as settings_file: FileNotFoundError: [Errno 2] No such file or directory: 'settings.conf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/Klipper-WS281x_LED_Status/klipper_ledstrip.py", line 167, in 20:21:44 Settings file (settings.conf) not found. Adding sample settings. 20:21:43 Running Command {status_led}...: 20:21:43 STATUS_LED

The setting.conf is in the same directory.

Paragaz avatar Jul 18 '22 18:07 Paragaz

And per SSH i got this error

pi@raspberrypi:~/Klipper-WS281x_LED_Status $ ./klipper_ledstrip.py Can't open /dev/mem: Permission denied Traceback (most recent call last): File "/home/pi/Klipper-WS281x_LED_Status/./klipper_ledstrip.py", line 167, in run() File "/home/pi/Klipper-WS281x_LED_Status/./klipper_ledstrip.py", line 50, in run strip.begin() File "/usr/local/lib/python3.9/dist-packages/rpi_ws281x/rpi_ws281x.py", line 131, in begin raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp)) RuntimeError: ws2811_init failed with code -5 (mmap() failed) Segmentation fault

Paragaz avatar Jul 18 '22 19:07 Paragaz

Can you confirm that you have the name of the files correct ? You say setting.conf is in the same directory, but the filename should be settings.conf.

Will-wastelander avatar Aug 28 '22 18:08 Will-wastelander

And per SSH i got this error

pi@raspberrypi:~/Klipper-WS281x_LED_Status $ ./klipper_ledstrip.py Can't open /dev/mem: Permission denied Traceback (most recent call last): File "/home/pi/Klipper-WS281x_LED_Status/./klipper_ledstrip.py", line 167, in run() File "/home/pi/Klipper-WS281x_LED_Status/./klipper_ledstrip.py", line 50, in run strip.begin() File "/usr/local/lib/python3.9/dist-packages/rpi_ws281x/rpi_ws281x.py", line 131, in begin raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp)) RuntimeError: ws2811_init failed with code -5 (mmap() failed) Segmentation fault

Same issue for me running it on PIN 18

blondsign avatar Feb 06 '23 17:02 blondsign

I believe that pin 10 is the only pin allowed to run without sudo. You could either run the script manually with sudo each time or modify the service to use the root user.

11chrisadams11 avatar Feb 20 '23 21:02 11chrisadams11