2

从 plone 3.3.2 迁移到 plone 4.2.1 失败并出现 PosKeyError。我已经尝试了这篇文章http://plonechix.blogspot.com/2009/12/definitive-guide-to-poskeyerror.html中的食谱。我已经运行了 error_finder 片段,但它没有给我任何异常。我也尝试在调试器中使用对象app.mysite._p_jar[p64(oid)]- 也没有成功,它失败并出现同样的错误。

如何删除损坏的对象或至少获取有关对象的更多信息(例如其类名或位置)?

完整追溯:

POSKeyError('\x00\x00\x00\x00\x00\x0ey=',)
(Also, the following error occurred while attempting to render the standard error message, please see the event log for full details:
An operation previously failed, with traceback: 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZServer/PubCore/ZServerPublisher.py", line 31, in __init__
  response=b) 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZPublisher/Publish.py", line 443, in publish_module
  environ, debug, request, response)
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZPublisher/Publish.py", line 237, in publish_module_standard
  response = publish(request, module_name, after_list, debug=debug)
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZPublisher/Publish.py", line 134, in publish
  transactions_manager.commit()
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/Zope2/App/startup.py", line 301, in commit
  transaction.commit()
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_manager.py", line 89, in commit
  return self.get().commit()
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 336, in commit
  t, v, tb = self._saveAndGetCommitishError()
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 329, in commit
  self._commitResources()
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 443, in _commitResources
  rm.commit(self)
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/Connection.py", line 572, in commit
  oid, serial, transaction)
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/BaseStorage.py", line 416, in checkCurrentSerialInTransaction
  committed_tid = self.getTid(oid)
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/FileStorage/FileStorage.py", line 770, in getTid
  with self._lock:
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/FileStorage/FileStorage.py", line 403, in _lookup_pos
  raise POSKeyError(oid)
POSKeyError: 0x0e793d
4

2 回答 2

0

You can use the fsrefs.py to find the bad object.

A very short article on using it is: http://nathanvangheem.com/news/fixing-broken-zodb-object-references

于 2012-09-21T01:49:24.867 回答
0

我相信这与我刚刚遇到的问题相同,如果回滚保存点(包括将对象添加到目录)会发生这种情况。我认为这是 ZODB 中的一个错误,但您可以通过解决回滚保存点的任何问题来解决它,在这种情况下,就是将文件和图像迁移到 blob。因此,如果您解决了使这些文件或图像无法成功迁移到 BLOB(或只是删除它们)的问题,那么它应该会成功。

于 2012-11-21T18:00:14.997 回答