-
Notifications
You must be signed in to change notification settings - Fork 654
Open
Description
Trying to copy header data over from one EXR file to another, I encountered the following error:
RuntimeError: unrecognized type of attribute 'com.arri.camera.LookCdlOffset': type=ndarray value=[0. 0. 0.] dtype=float32
Below is a minimal example of code producing the issue, with example files.zip attached.
import OpenEXR as exr
# Copy header from file_two to file_one and save new file as file_three.
with exr.File("/tmp/file_one.exr") as file_one:
output_header = file_one.header()
with exr.File("/tmp/file_two.exr") as file_two:
for key, value in file_two.header().items():
if key not in (
"displayWindow",
"dataWindow",
"pixelAspectRatio",
"screenWindowCenter",
"screenWindowWidth",
"lineOrder",
"compression",
"channels",
"tiles",
"view",
"name",
"type",
"version",
"chunkCount",
"maxSamplesPerPixel",
):
output_header[key] = value
with exr.File(output_header, file_one.channels()) as output_file:
output_file.write("/tmp/file_three.exr")
The workaround is to convert the array to a list with value.tolist()
.
Tested with Python 3.10.14, OpenEXR v3.3.3 and numpy 2.0.0 on macos and linux/rocky9.4
Thank you,
Vladimir
Metadata
Metadata
Assignees
Labels
No labels