MRX8024 / chopper-resonance-tuner

Registers calibration script for TMC drivers
GNU General Public License v3.0
81 stars 13 forks source link

pandas.errors.EmptyDataError: No columns to parse from file #5

Closed JD72 closed 3 months ago

JD72 commented 3 months ago

It is the second time. First time the all stages passed flawlessly. How to run parsing stage only again? Thank you.

17:01
For manual use - RUN_SHELL_COMMAND CMD=chop_tune PARAMS='current_min_ma=400 current_max_ma=400 current_change_step=10 tbl_min=0 tbl_max=3 toff_min=1 toff_max=8 hstrt_hend_max=16 hstrt_min=0 hstrt_max=7 hend_min=2 hend_max=15 tpfd_min=0 tpfd_max=0 min_speed=41 max_speed=41 iterations=4 accel_chip=lis2dw driver=2209 sense_resistor=0.110000'
17:01
Command {chop_tune} finished
17:01
pandas.errors.EmptyDataError: No columns to parse from file
17:01
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pandas/_libs/parsers.pyx", line 554, in pandas._libs.parsers.TextReader.__cinit__
17:01
self._reader = parsers.TextReader(src, **kwds)
17:01
return mapping[engine](f, **self.options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pandas/io/parsers/c_parser_wrapper.py", line 79, in __init__
17:01
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pandas/io/parsers/readers.py", line 1753, in _make_engine
17:01
self._engine = self._make_engine(f, self.engine)
17:01
File "/usr/lib/python3/dist-packages/pandas/io/parsers/readers.py", line 1442, in __init__
17:01
parser = TextFileReader(filepath_or_buffer, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:01
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pandas/io/parsers/readers.py", line 605, in _read
17:01
return _read(filepath_or_buffer, kwds)
17:01
Traceback (most recent call last):
File "/home/klipper/chopper-resonance-tuner/chopper_plot.py", line 149, in
main()
File "/home/klipper/chopper-resonance-tuner/chopper_plot.py", line 108, in main
data = pd.read_csv(file_path, delimiter=',')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pandas/util/_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pandas/util/_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pandas/io/parsers/readers.py", line 950, in read_csv
17:01
Processing CSV files: 0%| | 0/11648 [00:00Processing CSV files: 0%| | 4/11648 [00:00<05:52, 33.02it/s]
Processing CSV files: 0%| | 8/11648 [00:00<06:03, 32.05it/s]
Processing CSV files: 0%| | 12/11648 [00:00<05:48, 33.40it/s]
Processing CSV files: 0%| | 16/11648 [00:00<05:36, 34.55it/s]
MRX8024 commented 3 months ago

Hello. If I understand сorrectly, you want to run only the parser. In which case the first line of your pinned code is responsible for this. For manual use - RUN_SHELL_COMMAND CMD=chop_tune PARAMS='current_min_ma=400 current_max_ma=400 current_change_step=10 tbl_min=0 tbl_max=3 toff_min=1 toff_max=8 hstrt_hend_max=16 hstrt_min=0 hstrt_max=7 hend_min=2 hend_max=15 tpfd_min=0 tpfd_max=0 min_speed=41 max_speed=41 iterations=4 accel_chip=lis2dw driver=2209 sense_resistor=0.110000'

However, this will only work if you haven't rebooted the host. -Maxim

JD72 commented 3 months ago

Seems like I expressed wrong. I mean last stage when performs the gathered data analyzing and making HTML report.

JD72 commented 3 months ago

...as I can see last 5035 (from 11649) CSV files have 0 size. Host have 512 MB RAM and SWAP about 4000 MB. What might be wrong?

MRX8024 commented 3 months ago

Wow, I didn’t even notice that you decided to do 4 iterations. But unfortunately, yes, you have run out of space in your /tmp folder. It's hurts. You can see how much space this folder has with the command df -h. If there is a /tmp parameter, then the size of this folder depends on the ROM, not the RAM. And you can change its value, temporarily, until a reboot, with the command sudo mount -o remount,size=4000M /tmp. If the memory depends on RAM, then you can find on the Internet how to change it :)

And you will have to take the test again. Consider whether you should do 4 iterations on such a large range of registers.

-Maxim

JD72 commented 3 months ago

Ok, thank you.

Ataraxia-Mechanica commented 2 months ago

And you can change its value, temporarily, until a reboot, with the command sudo mount -o remount,size=4000M /tmp.

Can you mention this in the instructions? Ran out of space 87% into tuning and have to redo it all over again.