#Cartographer Initialization Issue

55 messages ยท Page 1 of 1 (latest)

terse trellis
#

It was previously working, but I had a crash and changed extruder to gallileo 2. I took the opportunity to update everything (klipper & co). Sounds like there's a version mismatch
Getting this error from klipper.log

[cartographer] Loaded Cartographer3D Plugin version 1.4.3 using KlipperIntegrator
Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 123, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/klipper/klippy/klippy.py", line 112, in load_object
    self.objects[section] = init_func(config.getsection(section))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/scanner.py", line 3898, in load_config_prefix
    scanner = config.get_printer().lookup_object("scanner")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/klippy.py", line 79, in lookup_object
    raise self.config_error("Unknown config object '%s'" % (name,))
configparser.Error: Unknown config object 'scanner'
webhooks client 547502103632: New connection
webhooks client 547502103632: Client info {'program': 'Moonraker', 'version': 'v0.10.0-9-g3fbe6ee'}
#
pi@mainsailos:~/cartographer-klipper $ git pull
Already up to date.
pi@mainsailos:~/klipper $ git pull
Already up to date.

sly vale
#

check the cartographer server. there was a breaking change to klipper that renders cartographer inoperable. the fix is listed there.

terse trellis
#

What do you mean by carto server?

#

Not seeing the note

sly vale
#

#1218945290741219410 message

terse trellis
#

tx

#

Damnit

#

No fix for now?

sly vale
#

downgrade klipper, or wait for a fix to the cartographer plugin

terse trellis
#

What is the latest klipper working version? My search skill over there is not on point

sly vale
#

#1165274914606035047 message

ocean mirage
#

That error you're getting is because you're using the config for the old carto pluging, but are probably using the new pluging. You'll need to update your config

#

As for the breaking change in klipper, don't go past klipper v0.13.0-567 (commit 5557780) and you're fine

terse trellis
#

Yea I updated as per the doc

ocean mirage
#

Oh, apologies, I should have looked at your printer.cfg. You are using the new config, however at the bottom of your printer.cfg in the "do not edit" section, you still have a [scanner model default] section. Remove all that

#

So remove this entire section:

#*# model_coef = 1.4536755269749384,
#*#       1.8366719398227664,
#*#       0.8296041204391856,
#*#       0.2870745271056379,
#*#       -0.11704059351228943,
#*#       0.5942914713932259,
#*#       0.6573826214554873,
#*#       -0.7774244020339891,
#*#       -0.2720469757868838,
#*#       0.5132406569846972
#*# model_domain = 3.199503058810271e-07,3.318862585233057e-07
#*# model_range = 0.100000,5.000000
#*# model_temp = 60.196783
#*# model_offset = 0.00000
#*# model_mode = scan
#*# model_fw_version = CARTOGRAPHER 5.0.0
#

You will have to recalibrate cartographer after that though

terse trellis
#

grrrr

Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 123, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/klipper/klippy/klippy.py", line 112, in load_object
    self.objects[section] = init_func(config.getsection(section))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 2075, in load_config
    cartographer = CartographerProbe(config)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 148, in __init__
    self.gcode.register_command("probe", self.cmd_PROBE,
  File "/home/pi/klipper/klippy/gcode.py", line 148, in register_command
    raise self.printer.config_error(
configparser.Error: Can't register 'probe' as it is an invalid name
webhooks client 548519349584: New connection
webhooks client 548519349584: Client info {'program': 'Moonraker', 'version': 'v0.10.0-9-g3fbe6ee'}

klipper
v0.13.0-567 > v0.13.0-572
Cartographer Plugin
1.4.3

ocean mirage
#

That's a bit weird, as that error originates from the old carto plugin. Do you have both installed now?

#

If you want to get rid of the old plugin, ssh into your raspi; then execute cd klipper/klippy/extras && rm idm.py scanner.py cartopgrapher.py. This will remove the python files belonging to the old plugin. Then restart klippy again

terse trellis
#
=======================
Extruder max_extrude_ratio=0.266081
Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 127, in _read_config
    pconfig.check_unused_options(config)
  File "/home/pi/klipper/klippy/configfile.py", line 489, in check_unused_options
    self.validate.check_unused(config.fileconfig)
  File "/home/pi/klipper/klippy/configfile.py", line 435, in check_unused
    raise error("Section '%s' is not a valid config section"
configparser.Error: Section 'cartographer' is not a valid config section
webhooks client 548042721040: New connection
webhooks client 548042721040: Client info {'program': 'Moonraker', 'version': 'v0.10.0-9-g3fbe6ee'}
#

๐Ÿฅฒ

ocean mirage
#

What in the.... that means you don't have the new plugin installed, or accidentally erased it. But not to worry, you can just rerun the install script again to fix that.

terse trellis
#
=======================
Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 123, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/klipper/klippy/klippy.py", line 112, in load_object
    self.objects[section] = init_func(config.getsection(section))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 2075, in load_config
    cartographer = CartographerProbe(config)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 148, in __init__
    self.gcode.register_command("probe", self.cmd_PROBE,
  File "/home/pi/klipper/klippy/gcode.py", line 148, in register_command
    raise self.printer.config_error(
configparser.Error: Can't register 'probe' as it is an invalid name
webhooks client 548011859344: New connection
webhooks client 548011859344: Client info {'program': 'Moonraker', 'version': 'v0.10.0-9-g3fbe6ee'}
Cartographer: linking modules into klipper
Python version in Klippy environment: 3.11.2
Cartographer Probe: installation successful.
#

using
pi@mainsailos:~/cartographer-klipper $ ./install.sh

ocean mirage
#

You're installing the old plugin again that way ๐Ÿ˜›

terse trellis
#

ah

#
pi@mainsailos:~ $ cd klipper/klippy/extras && rm idm.py scanner.py cartopgrapher.py
rm: cannot remove 'cartopgrapher.py': No such file or directory
pi@mainsailos:~ $ curl -s -L https://raw.githubusercontent.com/Cartographer3D/cartographer3d-plugin/refs/heads/main/scripts/install.sh | bash -s -- --klipper ~/klipper --klippy-env ~/klippy-env
Cleaning up legacy and scaffolding files...
#

Cleaning up legacy
a lie

#
=======================
Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 123, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/klipper/klippy/klippy.py", line 112, in load_object
    self.objects[section] = init_func(config.getsection(section))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 2075, in load_config
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 148, in __init__
  File "/home/pi/klipper/klippy/gcode.py", line 148, in register_command
    raise self.printer.config_error(
configparser.Error: Can't register 'probe' as it is an invalid name
webhooks client 548043795792: New connection
webhooks client 548043795792: Client info {'program': 'Moonraker', 'version': 'v0.10.0-9-g3fbe6ee'}
ocean mirage
#

Oh sorry, I made a typo in that. it should be cd klipper/klippy/extras && rm idm.py scanner.py cartographer.py (note the last filename, it's not cartopgrapher.py, but I have fat fingers)

#

Possibly the first two files are already removed and it'll complain about that, but shouldn't be an issue. As long as the old cartographer.py file is removed too (which is where the error originates from)

terse trellis
#
=======================
Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 123, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/klipper/klippy/klippy.py", line 112, in load_object
    self.objects[section] = init_func(config.getsection(section))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 2075, in load_config
  File "/home/pi/klipper/klippy/extras/cartographer.py", line 148, in __init__
  File "/home/pi/klipper/klippy/gcode.py", line 148, in register_command
    raise self.printer.config_error(
configparser.Error: Can't register 'probe' as it is an invalid name
webhooks client 548041786192: New connection
webhooks client 548041786192: Client info {'program': 'Moonraker', 'version': 'v0.10.0-9-g3fbe6ee'}
#

I didn't see the typo LOL

#

I deleted and ran the new install command

#

The new install script recreate the file

pi@mainsailos:~/klipper/klippy/extras $ ls | grep carto
cartographer.py
#

oh well

#

I guess I will simply cry

ocean mirage
#

Oh, but if that's after you run the installer for the new plugin, that might be alright

#

what does ls -l ~/klipper/klippy/extras/cartographer.py return?

terse trellis
#

pi@mainsailos:~ $ ls -l ~/klipper/klippy/extras/cartographer.py
-rw-r--r-- 1 pi pi 33 Mar 5 17:22 /home/pi/klipper/klippy/extras/cartographer.py

ocean mirage
#

Yup, that's the new plugin

#

If you restart klippy now the error should be gone ๐Ÿคž

terse trellis
#

After a reboot it works!

deft hare
#

I can't for the life of me figure out what carto is doing as none of my printers from before the January have a carto file in extras folder
If you're all good though please mark as solved

ocean mirage
deft hare
#

OH! that makes sense

terse trellis
#

@ocean mirage
is this fine to ignore?

 Klipper warning

MCU 'cartographer' has deprecated code (it is missing feature 'get_canbus_status'). Recompiling and flashing is recommended (MCU version 'CARTOGRAPHER 5.0.0', host version 'v0.13.0-567-g55577808c-dirty').
deft hare
#

is it actually a warning or is it preventing klipper from booting?

#

#1165274914606035047 message this is relevant

ocean mirage
#

That's just a warning and can be ignored for now, but for a future klipper version the cartographer firmware will require an update. afaik they're already working on that but no idea when it's due. But as always, the best advice in this is: don't update klipper if your printer is in a perfectly working state. It's not like your desktop or phone OS that needs constant updating ๐Ÿ˜‰