Hello geomorph,
Were you able to solve the problem already?
If not, then I can suggest the following edits:
in line #44: chunk.alignCameras(adaptive_fitting = False)
in line #117: chunk.buildDem(source=PhotoScan.DataSource.DenseCloudData, interpolation=PhotoScan.EnabledInterpolation, projection=crs)
(I think you can skip mesh generation then)
If you are still observing some issues, it would be helpful to get the reports from the old and new version of the script for the same or similar projects.