Forum Discussion

NisHera's avatar
NisHera
Valued Contributor
5 years ago
Solved

mysterious message

Hi

I'm having a message time to time could not find any reason.

dose any body have an idea.

it's same place when just started test.

comes only ramdomly ...

the number reffered did not change so may not be a memory location?

  • NisHera's avatar
    NisHera
    5 years ago

    for anybody come same problem...........................

    when Tabs changed, TC do not update it self ..stubbornly keep same values of it's childs.

    I use "Refresh mapping infor()" which did not work.

    But method "Refresh()" worked like a magic..!:manhappy:

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    We'd kind of need to know what's being executed.  What's the code being run?  Have you tried dropping in a break point and debugging to see where the error happens?

    • NisHera's avatar
      NisHera
      Valued Contributor

      Anyway I handled that using try/except ....but original problem is there.

      below is my code..(with solution)

       

      error fires at highlighted log message line

      class Tabs():
        def __init__(self,tab=None):
          self.tab = tab
        
        def tabExists(self):
          success = False
          while not success:
            try:
              Aliases.......MDIClient.RefreshMappingInfo()
              tabCount = Aliases...........MDIClient.ChildCount 
              if tabCount ==0 :
                return False
              for i in range (0,tabCount):
                childtab = Aliases.................MDIClient.Child(i)
                if self.tab in childtab.Text:
                  Log.Message(childtab.Text+" ..exists")
                  return True
              else:
                return False
              success = True   # <--this will never excute, just in case 
            except RuntimeError:
              Log.Message(RuntimeError)
              success =False

      Un fortunatly can not debug  since it dosn't occure every time ....

      once in 5 /6 times.

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Not been a Python guru...

        > for i in range (0,tabCount)

        Shouldn't it be

        for i in range (0,tabCount - 1)

        ?