15 attributeerror list object has no attribute items#16
Merged
Conversation
If inside a chunk of images there are no point annotations, the point to polygon script failed. We should avoid attempting to process such a chunk of image altogether.
mzur
reviewed
Oct 31, 2025
Member
mzur
left a comment
There was a problem hiding this comment.
Thanks! Could you please also add a test case for this?
mzur
approved these changes
Nov 4, 2025
Member
mzur
left a comment
There was a problem hiding this comment.
Looks good thanks.
You should always use the factory method for DB models in the tests. If there is an error for images because of a duplicate filename, you can still set a different filename with the factory method.
The first argument of assertEquals() is always the expected value. Otherwise the error message will be the wrong way around.
I fixed these in ab18f32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #15
To test this you can use a volume with one image with at least one point annotation and another without any. Change the
imageChunkSizeinPtpJob.phpto 1. On main, you get the error referenced in the Issue. With this branch, we avoid processing chunks that are empty.