"Dieter Maurer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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} _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )