Hi,
Is this object a class instance that you created? If it is then you need to override the __getstate__ and __setstate__ functions in order to bypass pickling of the webCam object. Here is an example:
Code:
class MyClass:
def __init__(self):
self.webCam = 0
self.variable = 'something'
def __getstate__(self):
odict = self.__dict__.copy() # copy the dict since we change it
del odict['webCam'] # remove webCam variable
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