vietanhdev / anylabeling

Effortless AI-assisted data labeling with AI support from YOLO, Segment Anything (SAM+SAM2), MobileSAM!!
https://anylabeling.nrl.ai
GNU General Public License v3.0
2.2k stars 236 forks source link

🐞fix: fix `shape.label` is none caused by label_dialog return empty s… #44

Closed liaozihang closed 1 year ago

liaozihang commented 1 year ago

In auto labeling mode. When you press ESC while labeling, an empty string will be returned.

CleanShot_2023-04-20_at_15 47 18@2x

`Traceback (most recent call last): File ".../anylabeling/anylabeling/views/labeling/label_widget.py", line 2566, in finish_auto_labeling_object self.unique_label_list.set_item_label(

File ".../anylabeling/anylabeling/views/labeling/widgets/unique_label_qlist_widget.py", line 38, in set_item_label html.escape(label), *color

File "/opt/homebrew/anaconda3/envs/anylabeling/lib/python3.8/html/init.py", line 19, in escape s = s.replace("&", "&") # Must be done first!

AttributeError: 'NoneType' object has no attribute 'replace'`

vietanhdev commented 1 year ago

Thank you!