GeDialog & SystemError: error return without excep



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/02/2012 at 09:14, xxxxxxxx wrote:

    Exception in thread Thread-1:
    Traceback (most recent call last) :
      File "/Applications/MAXON/CINEMA 4D R12 Dev/resource/modules/python/res/Python.osx.framework/lib/python2.6/threading.py", line 525, in __bootstrap_inner
      self.run()
      File "/Applications/MAXON/CINEMA 4D R12 Dev/plugins/plugin-test/package/repeattimer.py", line 74, in run
      self.update(self.counter)
      File "/Applications/MAXON/CINEMA 4D R12 Dev/plugins/plugin-test/package/mycommanddata.py", line 35, in timerCall
      self.__dialog.updateJobDetails(self.__jobChecker.jobDetails)
      File "/Applications/MAXON/CINEMA 4D R12 Dev/plugins/plugin-test/package/mydialog.py", line 42, in updateJobDetails
      self.AddStaticText(2000, c4d.BFH_CENTER, 200, 20, "buttonName")
    SystemError: error return without exception set

    I keep getting "SystemError: error return without exception set" when I try to update the GeDialog

      
    def updateJobDetails(self, jobDetails) :  
      
         self.jobDetails = jobDetails  
      
         self.LayoutFlushGroup(2)  
            
          numJobs = int(len(self.jobDetails))  
            
          print "numJobs ", numJobs  
            
          self.GroupBegin(id=4, flags=c4d.BFH_LEFT | c4d.BFV_TOP, title="", rows=1, cols=1, groupflags=c4d.BORDER_GROUP_IN)  
            
          buttonIDCount = 3000  
          buttonIDList = []  
            
          self.AddButton(2000, c4d.BFH_CENTER, 200, 20, "buttonName")  
                    
          self.GroupEnd()  
            
          self.LayoutChanged(2)  
    

    Is it not something I can do after the dialog window is built?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/02/2012 at 10:36, xxxxxxxx wrote:

    Yes, you usually can.
    Are you using threads? Would be useful to see the full code here.

    Cheers,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/02/2012 at 11:57, xxxxxxxx wrote:

    Yes, i'm using a timer thread.

    Although I should probably re-work my code as the c4d gui class has a timer built in...all i'm using it for is checking a directory structure every 5 seconds.

    bit strange how a thread can effect the GeDialog, i can make Groups but can't make any C4Dgadgets (buttons/static text/radio buttons etc)

    will post the code when i'm back in work :-)

    cheers



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/02/2012 at 12:02, xxxxxxxx wrote:

    Good, I can will then take a look at it. Especially the part where the timer-thread notifies the dialog.
    You should always modify the dialog when it is called from Cinema 4D, which means in it's own thread, not one you started.

    Cheers,
    Niklas



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/02/2012 at 03:40, xxxxxxxx wrote:

    Yeah it was because I had my own thread initiated.

    using C4D's GeDialog->Timer does the trick!

    thanks for your help!


Log in to reply