cvhciKIT / sloth

Sloth is a tool for labeling image and video data for computer vision research.
Other
611 stars 198 forks source link

AttributeError: 'MainWindow' object has no attribute 'menuAnnotation' #110

Closed Malt08 closed 7 years ago

Malt08 commented 7 years ago

When running python sloth I get the error:

Traceback (most recent call last):
  File "sloth", line 16, in <module>
    labeltool.execute_from_commandline(sys.argv)
  File "/home/mallory/Downloads/sloth-master/sloth/core/labeltool.py", line 152, in execute_from_commandline
    self._mainwindow = MainWindow(self)
  File "/home/mallory/Downloads/sloth-master/sloth/gui/labeltool.py", line 73, in __init__
    self.setupGui()
  File "/home/mallory/Downloads/sloth-master/sloth/gui/labeltool.py", line 269, in setupGui
    self.initAnnotationMenu()
  File "/home/mallory/Downloads/sloth-master/sloth/gui/labeltool.py", line 216, in initAnnotationMenu
    self.ui.menuAnnotation.addAction(action)
AttributeError: 'MainWindow' object has no attribute 'menuAnnotation'
jrao1 commented 7 years ago

Add the following to sloth/gui/labeltool.ui, below menuOptions widget:


   <widget class="QMenu" name="menuAnnotation">
    <property name="title">
     <string>&amp;Annotation</string>
    </property>
   </widget>
   <addaction name="menuAnnotation"/>
nilsonholger commented 7 years ago

Hey @Malt08, thx for the bug report. Recently we added some functionality regarding annotations, apparently we missed a file. Many thx to @jrao1 for helping out so fast, we basically added his snippet to fix it in 66d3518, should be good now. Sorry for the trouble.