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

AXES_MAP_CALIBRATION: 'AxesMapFinder' object has no attribute 'create_graph' #99

Open
1 task done
bart594 opened this issue May 1, 2024 · 9 comments
Open
1 task done
Labels
bug Something isn't working done Issue is done but not merged on main

Comments

@bart594
Copy link

bart594 commented May 1, 2024

K-Shake&Tune module branch

  • I confirm using the main branch

Version

Shake&Tune version: v3.0.0-1-g56a5502

Describe the bug and expected behavior

If I run the macro from mainsail dashboard I'm getting errors, data are collected but can't create graph

`Writing raw accelerometer data to /tmp/mpu9250-axemap.csv file
Running Command {shaketune}...:
MPU9250 finished 'mpu9250' measurements
Traceback (most recent call last):
File "/home/pi/klippain_shaketune/src/is_workflow.py", line 408, in main
graph_creator.create_graph()
AttributeError: 'AxesMapFinder' object has no attribute 'create_graph'

Shake&Tune version: v3.0.0-1-g56a5502
Warning: Failed to restore the original locale setting: unsupported locale setting
Error while generating the graphs: 'AxesMapFinder' object has no attribute 'create_graph'
Command {shaketune} finished
`

Data are collected in csv file but shaketune.sh script can't create graph. Maybe some python libs are missing ? But i have ran install script once more and everything is ok (no errors or missing dependencies)

pi@mainsailos:~/printer_data/config/K-ShakeTune $ ./shaketune.sh -t axesmap --chip_name mpu9025
Shake&Tune version: v3.0.0-1-g56a5502
Warning: Failed to restore the original locale setting: unsupported locale setting
Error while generating the graphs: 'AxesMapFinder' object has no attribute 'create_graph'
Traceback (most recent call last):
File "/home/pi/klippain_shaketune/src/is_workflow.py", line 408, in main
graph_creator.create_graph()
AttributeError: 'AxesMapFinder' object has no attribute 'create_graph'

Here csv file output

#time,accel_x,accel_y,accel_z
1140.624583,8216.285956,12768.552499,148201.174088
1140.625565,8142.265362,13101.645173,147894.735889
1140.626547,6920.925558,13101.645173,148622.526612
1140.627528,6254.740210,12287.418637,149426.926885
1140.628510,6217.729913,12176.387746,149350.317335
1140.629492,6143.709319,12472.470123,149618.450759
1140.630474,6106.699021,12139.377449,150078.108058
1140.631455,6365.771101,11880.305369,149656.755534
1140.632437,6217.729913,12324.428934,148814.050486
1140.633419,5810.616645,12879.583391,148584.221837
1140.634401,5884.637239,12879.583391,148316.088413
1140.635382,6143.709319,12768.552499,147779.821564

Additional information and klippy.log

No response

@bart594 bart594 added the bug Something isn't working label May 1, 2024
@Pneumanifest
Copy link

Same issue for me.
image

@EightFinger
Copy link

Same for me too!

@rallegade
Copy link

Same here after i updated.

@Marucci87
Copy link

I have same issue, how do you get past this?

@Marucci87
Copy link

I just ran create vibrations profile macro then got this afterwards (Shake&Tune version: v3.0.0-1-g56a5502
Error while generating the graphs: File /home/biqu/printer_data/config/K-ShakeTune_results/vibrations/vibrations_20240509_195220_vibrations-axemap.csv.csv does not match expected format. Clean your /tmp folder and start again!)

@Bloodpack
Copy link

Same issue here, fresh install

@mhaas
Copy link

mhaas commented May 12, 2024

Very stupid workaround:

voron@voron-02:~/klippain_shaketune$ git diff
diff --git a/src/is_workflow.py b/src/is_workflow.py
index 5ae1370..c037828 100755
--- a/src/is_workflow.py
+++ b/src/is_workflow.py
@@ -371,6 +371,9 @@ class AxesMapFinder:
         with result_filename.open('w') as f:
             f.write(results)
 
+    def create_graph(self):
+        return self.find_axesmap()
+
 
 def main():
     options = Config.parse_arguments()

@mhaas
Copy link

mhaas commented May 12, 2024

FWIW, my patch above makes the actual error go away, but I still don't get any output because the CSV files in /tmp cannot be found - which doesn't make sense to me, because running the same code in Python shows that they are found. I'll stop playing with this now, but wanted to leave a note that the patch above is not enough.

@Frix-x
Copy link
Owner

Frix-x commented May 12, 2024

This is actually a known bug that was left as is for the v3.0.0 release, as this feature is not the most used and was already quite buggy... So I wanted to spend some time working on it to make it more reliable. In fact, it was almost like a random guess and definitely not perfect, so I think it's better to just not give anything than to give wrong results haha.

The macro call is already fixed for the next v4 release I'm working on. In the meantime, just set your axes_map manually, it should be no big deal. The rest should work as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Issue is done but not merged on main
Projects
None yet
Development

No branches or pull requests

8 participants