KiloQubit / probe_accuracy

GNU General Public License v3.0
94 stars 18 forks source link

Klippy UDS in different location #4

Closed Kosh42 closed 1 year ago

Kosh42 commented 1 year ago

Due to my install I'm in a home directory other than /home/pi. When I run with ~/ instead of /home/pi/ I do the Python install and VENV setup OK, but hen I run ~/plotly-env/bin/python3 ~/probe_accuracy/probe_accuracy.py I get:

Recording data, LEAVE THIS SESSION OPEN UNTIL THE SCRIPT SAYS "DONE"! Traceback (most recent call last): File "/home/tim/probe_accuracy/probe_accuracy.py", line 272, in <module> main() File "/home/tim/probe_accuracy/probe_accuracy.py", line 265, in main data = get_data(args.klippy_uds, args.data_file) File "/home/tim/probe_accuracy/probe_accuracy.py", line 118, in get_data for line in get_klippy_output(klippy_uds): File "/home/tim/probe_accuracy/probe_accuracy.py", line 57, in get_klippy_output sock.connect(klippy_uds) FileNotFoundError: [Errno 2] No such file or directory

Any thoughts? I looked through the .py file but didn't see any absolute file paths that needed changing.

Many thanks,

Kosh

KiloQubit commented 1 year ago

It looks like your Klipper unix domain socket is not /tmp/klippy_uds. You can change it by passing a flag to the script

probe_accuracy.py --klippy-uds /tmp/klippy_uds

and replacing /tmp/klippy_uds with your actual path

ajscheid commented 1 year ago

Hi,

I have the same problem but can't even find klippy_uds anywhere. It seems there have been some changes made lately which no broke the setup. ps auxww | grep klippy returns the following: pi 656 10.6 1.1 716276 43404 ? Ssl 18:25 0:27 /home/pi/klippy-env/bin/python /home/pi/klipper/klippy/klippy.py /home/pi/printer_data/config/printer.cfg -l /home/pi/printer_data/logs/klippy.log -I /home/pi/printer_data/comms/klippy.serial -a /home/pi/printer_data/comms/klippy.sock

Looking at the last line it seems the whole socket setup changed and there is no slippy_uds as such anymore.

And ideas to resolve this? I have no understanding of python though.....

KiloQubit commented 1 year ago

Hi,

I have the same problem but can't even find klippy_uds anywhere. It seems there have been some changes made lately which no broke the setup. ps auxww | grep klippy returns the following: pi 656 10.6 1.1 716276 43404 ? Ssl 18:25 0:27 /home/pi/klippy-env/bin/python /home/pi/klipper/klippy/klippy.py /home/pi/printer_data/config/printer.cfg -l /home/pi/printer_data/logs/klippy.log -I /home/pi/printer_data/comms/klippy.serial -a /home/pi/printer_data/comms/klippy.sock

Looking at the last line it seems the whole socket setup changed and there is no slippy_uds as such anymore.

And ideas to resolve this? I have no understanding of python though.....

klippy uds is the path after the -a option to klippy.py, so you'd run probe accuracy like

probe_accuracy.py --klippy-uds /home/pi/printer_data/comms/klippy.sock

UDS = unix domain socket

ajscheid commented 1 year ago

--klippy-uds /home/pi/printer_data/comms/klippy.sock

That worked, thank you for the advise, appreciated!

KiloQubit commented 1 year ago

The default location for klippy_uds has been changed to ~/printer_data/comms/klippy.sock to match the latest MainsailOS installs. You can still pass an arbitrary location with --klippy-uds.