Create lens calibration data for lensfun

Curious if anybody has lens_calibrate.py working on a recent distro, notably, with recent python. I managed to get around the darktable errors on debian 12 by running lens_calibrate.py on fedora 39, which almost seemed to work. It finally failed with errors such as:


Processing vignetting/30/_DSC8102.NEF …
Generating vignetting data for vignetting/exported/_DSC8102.pgm …
Processing vignetting/10/_DSC8106.NEF …
Generating vignetting data for vignetting/exported/_DSC8106.pgm …
concurrent.futures.process._RemoteTraceback:
“”"
Traceback (most recent call last):
File “/usr/lib64/python3.12/concurrent/futures/process.py”, line 263, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/lensfun/lens_calibrate/./lens_calibrate.py”, line 961, in create_vignetting_correction
calculate_vignetting(pgm_file, input_file, exif_data, distance)
File “/home/lensfun/lens_calibrate/./lens_calibrate.py”, line 800, in calculate_vignetting
plot_pdf(gp_filename)
File “/home/lensfun/lens_calibrate/./lens_calibrate.py”, line 520, in plot_pdf
subprocess.check_call(cmd, stdout=DEVNULL, stderr=subprocess.STDOUT)
File “/usr/lib64/python3.12/subprocess.py”, line 408, in check_call
retcode = call(*popenargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib64/python3.12/subprocess.py”, line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib64/python3.12/subprocess.py”, line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib64/python3.12/subprocess.py”, line 1824, in _execute_child
and os.path.dirname(executable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 181, in dirname
TypeError: expected str, bytes or os.PathLike object, not NoneType
“”"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/lensfun/lens_calibrate/./lens_calibrate.py”, line 1295, in
main()
File “/home/lensfun/lens_calibrate/./lens_calibrate.py”, line 1288, in main
run_vignetting()
File “/home/lensfun/lens_calibrate/./lens_calibrate.py”, line 1007, in run_vignetting
if f.result():
^^^^^^^^^^
File “/usr/lib64/python3.12/concurrent/futures/_base.py”, line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File “/usr/lib64/python3.12/concurrent/futures/_base.py”, line 401, in __get_result
raise self._exception
TypeError: expected str, bytes or os.PathLike object, not NoneType

I’m not sure if it’s due to differences in python’s concurrent/futures code between when lens_calibrate.py was written and now, but concurrent/futures errors always show up, no matter which format the image files have, or which distro (fedora 39 or debian 12) I use.

Wouldn’t be the first time I’d have to work with an older distro (still have a 20-some year old distro with now obsolete drivers to access Philips ToUCams, if anybody remembers those CCD webcams).

Just curious if anybody has lens_calibrate.py working on something recent, or else I’ll have to try an older distro (@Peter; happen to know which ubuntu release it worked for you?).

Thanks