[Zope] Re: UnpickleableError: Cannot pickle <type
'thread.lock'>objects
Dylan Jay
gmane at dylanjay.com
Wed Jun 15 00:56:10 EDT 2005
"Dieter Maurer" <dieter at handshake.de> wrote in message
news:17071.4574.893818.528219 at gargle.gargle.HOWL...
> Dylan Jay wrote at 2005-6-14 17:45 +1000:
>> ...
>>356, in _commit_objects
>> jar.commit(o, self)
>> File "C:\Program Files\Zope-2.7.5-final\lib\python\ZODB\Connection.py",
>>line 4
>>52, in commit
>> dump(state)
>>UnpickleableError: Cannot pickle <type 'thread.lock'> objects
>
> I would catch the error and enter a debugger to analyse the "o" above.
>
> With "pdb" (the Python Debugger, part of Python),
> this could look like:
>
> try: dump(state)
> except: import pdb; pdb.set_trace()
Good suggestion (I did try to get debugging working in WingIDE and Boa but
your way worked best in the end).
Unfortunatly I'm still none the wiser.
I know which object it is and I've looked at its state (below). I've looked
at the OOBTree and made sure it contains nothing that has a lock in it. I
can look at sys.exc_info[1].args which is a lock object but what I really
need to do is work out where this lock object is and why its entangled with
my transaction. Any suggestions?
{'__ac_local_roles__': {'djay': ['Owner']},
'_cacheables': {'constructReviewer': <NamedCacheable instance at 0409A8D0>,
'findNeighbors': <NamedCacheable instance at 0409A8C0>},
'_hasBeenTrained': 0,
'filterByMovies': 0,
'filterByPeople': 0,
'filterByVotes': 0,
'hashMoviesToUse': None,
'hashPeopleToUse': None,
'hoods': <OOBTree object at 0x041B5368>,
'id': 'predictor',
'keepInMemory': 0,
'moviesToUse': None,
'neighborhoodSize': 30,
'overlapPenalty': 50,
'peopleToUse': None,
'reviewers': None,
'title': '',
'votesToUse': None}
More information about the Zope
mailing list