-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add label check on import #2935
Conversation
for idx, ann in enumerate(item.annotations): | ||
try: | ||
if hasattr(ann, 'label') and ann.label is None: | ||
raise CvatImportError("annotation has no label") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it isn't the only way to raise the exception inside try/except block, probably you want to remove try/except in the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't, but the idea is to provide an informative wrapper for better investigation experience.
Motivation and context
How has this been tested?
Manually
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.