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

ValueError: <labelme.shape.Shape object at 0x000001BFA54D6310> is not in list #1488

Open
intbingbing opened this issue Aug 27, 2024 · 0 comments
Labels
bug issue

Comments

@intbingbing
Copy link

Provide environment information

Traceback (most recent call last):
File "E:\anaconda3\envs\PY311\Lib\site-packages\labelme\widgets\canvas.py", line 973, in keyReleaseEvent
index = self.shapes.index(self.selectedShapes[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: <labelme.shape.Shape object at 0x000001BFA54D6310> is not in list

What OS are you using?

windows 11

Describe the Bug

ValueError: <labelme.shape.Shape object at 0x000001BFA54D6310> is not in list

Expected Behavior

Tips: Adding a temporary try statement can prevent crashes

                # labelme\widgets\canvas.py line 979
                try:
                    index = self.shapes.index(self.selectedShapes[0])
                    if self.shapesBackups[-1][index].points != self.shapes[index].points:
                        self.storeShapes()
                        self.shapeMoved.emit()

                    self.movingShape = False
                except ValueError:
                    pass

To Reproduce

No response

@intbingbing intbingbing added the bug issue label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue
Projects
None yet
Development

No branches or pull requests

1 participant