Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export figure fails with unicode in image name #479

Open
will-moore opened this issue Aug 22, 2022 · 1 comment
Open

Export figure fails with unicode in image name #479

will-moore opened this issue Aug 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@will-moore
Copy link
Member

The export script uses a path based on the image's name to save the image to disk, either to use in a zip or to include into the PDF.
But the save fails if the name contains unicode characters.

See https://forum.image.sc/t/omero-figure-export-error/70861

            # create name to save image
            original_name = image.getName()
            img_name = os.path.basename(original_name)
            img_name = "%s_%s.tiff" % (idx, img_name)
        # Save Image to file, then bring into PDF
        pil_img.save(img_name)

Simply need to remove unicode characters - Not too important to preserve the name exactly as they are only used to recognise the images in a zip if user chooses to export "with images".

@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-figure-export-error/70861/3

@will-moore will-moore added the bug Something isn't working label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants