groakat / videotagger

10 stars 2 forks source link

adding annotation throws error when not using frame-wise steping #61

Closed groakat closed 10 years ago

groakat commented 10 years ago

If the jog wheel is used for navigation while having annotation is open, after a few frames an error is thrown. something on the lines of:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/videoPlayer.py in startVideo(self)
    981 
    982             if self.play:
--> 983                 self.showNextFrame(self.increment)
    984 
    985 #                 if self.increment == 0:

/home/peter/phd/code/pyTools/pyTools/pyTools/misc/config.pyc in call(self, *args, **kwargs)
    56         fStr = "[{0}/" + Fore.RED +"{1}" + Fore.RESET +"]"
    57         logE.debug(eStr.format(self.__class__, f.__name__)) #f.im_class,
---> 58         res = f(self, *args, **kwargs)
    59         logF.debug(fStr.format(self.__class__, f.__name__))
    60         return res

/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/videoPlayer.py in showNextFrame(self, increment, checkBuffer)
    767         if increment >= 0:
    768             self.frames += [self.vh.getNextFrame(increment, doBufferCheck=checkBuffer, 
--> 769                                                  unbuffered=False)]
    770         elif increment < 0:
    771             self.frames += [self.vh.getPrevFrame(-increment, doBufferCheck=checkBuffer,

/home/peter/phd/code/pyTools/pyTools/pyTools/misc/config.pyc in call(self, *args, **kwargs)
    56         fStr = "[{0}/" + Fore.RED +"{1}" + Fore.RESET +"]"
    57         logE.debug(eStr.format(self.__class__, f.__name__)) #f.im_class,
---> 58         res = f(self, *args, **kwargs)
    59         logF.debug(fStr.format(self.__class__, f.__name__))
    60         return res

/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/videoHandler.pyc in getNextFrame(self, increment, doBufferCheck, emitFileChange, unbuffered, posOnly)
    394         if not unbuffered:
    395             return self.getCurrentFrame(doBufferCheck=doBufferCheck,
--> 396                                         posOnly=posOnly)
    397         else:
    398             return self.getCurrentFrameUnbuffered(doBufferCheck=doBufferCheck,

/home/peter/phd/code/pyTools/pyTools/pyTools/misc/config.pyc in call(self, *args, **kwargs)
    56         fStr = "[{0}/" + Fore.RED +"{1}" + Fore.RESET +"]"
    57         logE.debug(eStr.format(self.__class__, f.__name__)) #f.im_class,
---> 58         res = f(self, *args, **kwargs)
    59         logF.debug(fStr.format(self.__class__, f.__name__))
    60         return res

/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/videoHandler.pyc in getCurrentFrame(self, doBufferCheck, updateAnnotationViews, posOnly)
    240 
    241             if updateAnnotationViews:
--> 242                 self.updateAnnoViewPositions()
    243 
    244             cfg.logGUI.debug(json.dumps({"key":self.posPath, 

/home/peter/phd/code/pyTools/pyTools/pyTools/misc/config.pyc in call(self, *args, **kwargs)
    56         fStr = "[{0}/" + Fore.RED +"{1}" + Fore.RESET +"]"
    57         logE.debug(eStr.format(self.__class__, f.__name__)) #f.im_class,
---> 58         res = f(self, *args, **kwargs)
    59         logF.debug(fStr.format(self.__class__, f.__name__))
    60         return res

/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/videoHandler.pyc in updateAnnoViewPositions(self, updateOnlyTempPosition)
    752             aV.setPosition(self.posPath, self.idx, 
    753                            tempPositionOnly= updateOnlyTempPosition,
--> 754                            metadata=self.curMetadata)
    755 
    756 

/home/peter/phd/code/pyTools/pyTools/pyTools/misc/config.pyc in call(self, *args, **kwargs)
    56         fStr = "[{0}/" + Fore.RED +"{1}" + Fore.RESET +"]"
    57         logE.debug(eStr.format(self.__class__, f.__name__)) #f.im_class,
---> 58         res = f(self, *args, **kwargs)
    59         logF.debug(fStr.format(self.__class__, f.__name__))
    60         return res

/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/annoView.pyc in setPosition(self, key, idx, tempPositionOnly, metadata)
    292 
    293         self.addTempAnno(key, idx, metadata)
--> 294         self.updateConfidenceList()#(key, idx)
    295         self.updateGraphicView()
    296 

/home/peter/phd/code/pyTools/pyTools/pyTools/misc/config.pyc in call(self, *args, **kwargs)
    56         fStr = "[{0}/" + Fore.RED +"{1}" + Fore.RESET +"]"
    57         logE.debug(eStr.format(self.__class__, f.__name__)) #f.im_class,
---> 58         res = f(self, *args, **kwargs)
    59         logF.debug(fStr.format(self.__class__, f.__name__))
    60         return res

/home/peter/phd/code/pyTools/pyTools/pyTools/videoPlayer/annoView.pyc in updateConfidenceList(self, key, idx)
    393                             and (curKey in tempKeys)
    394                             and (curIdx in self.tempRng[curKey])):
--> 395                 conf = [self.tempValue[curKey][curIdx]["confidence"]]
    396             elif (self.erasingAnno 
    397                             and (curKey in tempKeys)

KeyError: 6554