so has anyone managed to get FDC to run..? whilst running = python3 -m pip install -r requirements.txt
python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise , Im getting errors such as ModuleNotFoundError: No module named 'scipy' . I did the git clone, and it runs, building the mesh with temp .. any help would be appreciated.
#Getting FDC to work cant install scipy
56 messages · Page 1 of 1 (latest)
Something appears to be broken on your Pi's Python installation and tbh such errors are stupid to debug.
Worst case you break something else, if you start upgrading or installing stuff.
Scipy needs some Fortran tools, which you might be able to get with one of these commands (according to the internet)
sudo apt-get install gfortran
sudo apt install build-essential
But if you tried to run the script on your Windows PC, you'll only need to install Python (from the official website) and do pip install matplotlib numpy scipy
thanks, frustrating that gfortran and build-essential are already installed and latest version
hmm, further evidence that something is broken 
if you run gfortran --version, is the tool found?
so if i burnt a new image on my sd.. what files from my install would i need to backup, just printer.cfg ?
One more thing to try: pip install scipy --no-build-isolation
GNU Fortran (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So it is cleared found
Good question, maybe there is documentation on the RatOS homepage.
I'd backup the whole printer_data directory, to be safe
pip install meson-python
ok just installed that amd now trying the scipy again
... with the --no-build-isolation, yes!
another idea: uninstall numpy, then reinstall scipy.
pip uninstall numpy (-> answer with yes)
pip install scipy (will also hopefully also install a compatible version of numpy)
so close !
pi@RatOS1:~/FDC $ pip install scipy --no-build-isolation
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting scipy
Using cached scipy-1.11.1.tar.gz (56.0 MB)
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
meson-python: error: Could not find ninja version 1.8.2 or newer.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I REALLY appreciate your help BTW 😉
pip install ninja 
That why i absolute hate compiling things from scratch. At the end you have 900 ancient tools on your PC.
it's not ending... pip install Cython
I'm quickly off to wash the car, so I may take longer to respond 
no worries.. it did have an error of "Program pythran found: NO" , so installled that, just waiting thanks mate
pip install pybind11
Beat me to it. Im just reinstalling Python 3.7 as that is one of the pre-requisites.. dont think it was installed 
will then try again with the scipy .. this is going to be one messy install at this rate
3.9 should have worked too, i'd rather upgrade to newest version 3.11
Ah, one more weird dependency
This isn't a python package now, according to the internet it comes from
sudo apt-get install libopenblas-dev
ok installed that, now running scipy, taking forever
I think this has worked !!! Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting scipy
Using cached scipy-1.11.1.tar.gz (56.0 MB)
Preparing metadata (pyproject.toml) ... done
Collecting numpy<1.28.0,>=1.21.6 (from scipy)
Using cached https://www.piwheels.org/simple/numpy/numpy-1.25.0-cp39-cp39-linux_armv7l.whl (12.5 MB)
Building wheels for collected packages: scipy
Building wheel for scipy (pyproject.toml) ... done
Created wheel for scipy: filename=scipy-1.11.1-cp39-cp39-linux_armv7l.whl size=65100320 sha256=9bd02766d423586432a22137698d9f07d7becfd9a6de15a3d684ea98786ebd36
Stored in directory: /home/pi/.cache/pip/wheels/e7/15/e0/4ab00ce22c88d258eec967b9805faa930351f82116be40f983
Successfully built scipy
Installing collected packages: numpy, scipy
Successfully installed numpy-1.25.0 scipy-1.11.1
thanks !!!!!!
nearlly ;9
😦
Writing results to file thermal_quant__2023-07-02_18-16-00.json...DONE
ALL MEASUREMENTS COMPLETE!
^C
[1]+ Done nohup python3 measure_thermal_behavior.py 0.1 > out.txt
pi@RatOS1:~/FDC $ python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise
Traceback (most recent call last):
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 393, in <module>
main(sys.argv)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 328, in main
with open(source_file, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'json_file'
after all measurements complete. I run = python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise
and then get the error above
When I run LS it is showing the JSON
You need to add the actual filename (thermal_quant_blablabla.json) instead of „json_file“. 😛
It tries to open a file called „json_file“, but that doesn’t exist
oh ffs, I set bed to even 10,10 .. try again python3 generate_FDC_meshes_z_heights.py thermal_quant__2023-07-02_18-16-00.json 0.1 --filter_noise
Traceback (most recent call last):
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 393, in <module>
main(sys.argv)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 335, in main
new_meshes = gen_missing_meshes_by_step_interpolated(thermal_data["hot_mesh"], step)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 187, in gen_missing_meshes_by_step_interpolated
z_meshes_3d, temp_list = convert_meshes_json_to_list(meshes, step)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 161, in convert_meshes_json_to_list
measurement_points_normalized = normal_mesh_to_zero_middle(measurement["points"], temp)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 60, in normal_mesh_to_zero_middle
middle_z = get_middle_point_from_mesh(zpoints)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 46, in get_middle_point_from_mesh
raise Exception("Mesh is supposed to have an odd number of probes! (5,5) (7,7) (9,9) and so on, current probe count (%s, %s)" % (len(zpoints), len(zpoints[0])))
Exception: Mesh is supposed to have an odd number of probes! (5,5) (7,7) (9,9) and so on, current probe count (10, 10)