Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RatOS Internal error on command:"BED_MESH_CALIBRATE" when using faulty_region #166

Open
BDworak opened this issue Nov 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BDworak
Copy link

BDworak commented Nov 16, 2024

What happened

When attempting to set faulty_region in a printer.cfg under a custom [bed_mesh] upon completing a BED_MESH_CALIBRATE the printer shuts down with the following error: Internal error on command:"BED_MESH_CALIBRATE".

klippy.log reports

Internal error on command:"BED_MESH_CALIBRATE"
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/gcode.py", line 211, in _process_commands
    handler(gcmd)
  File "/home/pi/klipper/klippy/gcode.py", line 137, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
  File "/home/pi/klipper/klippy/extras/beacon.py", line 2671, in cmd_BED_MESH_CALIBRATE
    self.calibrate(gcmd)
  File "/home/pi/klipper/klippy/extras/beacon.py", line 2906, in calibrate
    matrix = self._process_clusters(clusters, gcmd)
  File "/home/pi/klipper/klippy/extras/beacon.py", line 3079, in _process_clusters
    raise Exception("Error processing mesh: %s" % (result,))
Exception: Error processing mesh: Traceback (most recent call last):
  File "/home/pi/klipper/klippy/extras/beacon.py", line 3062, in do
    (False, self._do_process_clusters(raw_clusters, dump_file))
  File "/home/pi/klipper/klippy/extras/beacon.py", line 3102, in _do_process_clusters
    (error, interpolator_or_msg) = self._load_interpolator()
  File "/home/pi/klipper/klippy/extras/beacon.py", line 3153, in _load_interpolator
    if hasattr(self.scipy.interpolate, "RBFInterpolator"):
  File "/home/pi/klippy-env/lib/python3.9/site-packages/scipy/__init__.py", line 134, in __getattr__
    return _importlib.import_module(f'scipy.{name}')
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/pi/klippy-env/lib/python3.9/site-packages/scipy/interpolate/__init__.py", line 167, in <module>
    from ._interpolate import *
  File "/home/pi/klippy-env/lib/python3.9/site-packages/scipy/interpolate/_interpolate.py", line 10, in <module>
    import scipy.special as spec
  File "/home/pi/klippy-env/lib/python3.9/site-packages/scipy/special/__init__.py", line 777, in <module>
    from . import _ufuncs
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

Transition to shutdown state: Internal error on command:"BED_MESH_CALIBRATE"

What did you expect to happen

A bed mesh to complete and the faulty bed regions to have interpolated values. I am using a magnetic bed and am looking to remove the dips created by the magnets from the bed mesh.

How to reproduce

Create a custom [bed_mesh] configuration in your printer.cfg and add configure faulty_regions then run a BED_MESH_CALIBRATE. Below is my example [bed_mesh] configuration that was causing this issue. This was configured on a Rat Rig vCore4 500 so adjustments may need to be made to accommodate smaller machines.

[bed_mesh]
speed: 800
horizontal_move_z: 2
mesh_min: 30, 30
mesh_max: 480,445 
fade_start: 0.6
fade_end: 10.0
probe_count: 25,25
algorithm: bicubic
zero_reference_position: 250, 290
faulty_region_1_min: 230.0, 1.0
faulty_region_1_max: 270.0, 40.0

Additional information

I was able to find online that the fix for the error

ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

was to login to the pi via ssh and run

sudo apt-get install libopenblas-dev

Not sure if this is the ideal fix for this, but installing libopenblas-dev had resolved the missing reference issue likely used while the bed mesh attempts to interpolate the bed points I am trying to filter out.

@BDworak BDworak added the bug Something isn't working label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant