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

Bug in Exception Message for duplicate Image names #68

Closed
JensWendt opened this issue Feb 14, 2022 · 2 comments
Closed

Bug in Exception Message for duplicate Image names #68

JensWendt opened this issue Feb 14, 2022 · 2 comments

Comments

@JensWendt
Copy link

Hello,

I just wanted to make you aware of a small bug in line 803 of populate.py.
While playing around with the script populate metadata I had a case where - unknowingly - two images were named the same.
This problem is caught in the if clause : if iname in self.images_by_name
but in the following raised Exception message:
"Image named %s(id=%d) present. (id=%s) % ( iname, self.images_by_name[iname], iid
the second format %d expects the image ID but gets an ImageI variable.
This is easily corrected by adding self.images_by_name[iname].id.val
I tried it out and now it gives the correct error message.

will-moore added a commit to will-moore/omero-metadata that referenced this issue Feb 16, 2022
@will-moore
Copy link
Member

I came across this bug while working on #62 so I have included a fix in that PR.

@JensWendt
Copy link
Author

okay, perfect. wasn't aware. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants