WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-02-2005, 07:47 PM
Vygreif Vygreif is offline
Member
 
Join Date: Sep 2005
Posts: 21
Hi,
I'm trying to use your method. But I think I can't get it to override

def __getState__(self):

I tried the following code

def __getState__(self):
assert 0 == 1, 'Overriden'
print 5/0
odict = self.__dict__.copy()
del odict['NodShakeDetector']
del odict['LookAwayDetector']
del odict['TalkingDetector']
return odict

def __setstate__(self, dict):
#self.webCam = 0 # initialize webCam object since it won't be in dict
self.__dict__.update(dict) # update attributes

But I don't think it ever calls getState, I neither get a divide by 0 error, nor an assert. And if I don't have the assert or the divide by 0 error it complains about the pickle error.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC