[Python] Python nd2.nd2_to_tiff randomly started returning error

Discussão em 'Python' iniciado por Stack, Abril 12, 2025.

  1. Stack

    Stack Membro Participativo

    Here is the code I am running:

    imagePath = r"C:\path"
    nd2.nd2_to_tiff(imagePath, imagePath[:-4] + '.tiff')


    Here is the error I am getting:

    Traceback (most recent call last):
    File "c:\Users\...\main.py", line 83, in <module>
    nd2.nd2_to_tiff(imagePath, imagePath[:-4] + '.tiff')
    File "C:\Users\...\site-packages\nd2\tiff.py", line 187, in nd2_to_tiff
    resolutionunit=tf.TIFF.RESUNIT.MICROMETER,
    ^^^^^^^^^^^^^^^
    AttributeError: '_TIFF' object has no attribute 'RESUNIT'


    The code was working fine on a desktop an my school, but when I uploaded to my laptop I started to get this error.

    Continue reading...

Compartilhe esta Página