I have several dbs migrated from python 2 to python 3, Plone 5.2. One of them is giving me an error when packing the database
Traceback (most recent call last):
File "/plone/plone5.2/buildout/bin/zeopack", line 42, in <module>
sys.exit(plone.recipe.zeoserver.pack.main(host, port, unix, days, username, password, realm, blb_dir, storage))
File "/plone/eggs/plone.recipe.zeoserver-2.0.1-py3.6.egg/plon/recipe/zeoserver/pack.py", line 65, in main
_main(*args, **kw)
File "/plone/eggs/plone.recipe.zeoserver-2.0.1-py3.6.egg/plon/recipe/zeoserver/pack.py", line 46, in _main
cs.pack(wait=True, days=int(days))
File "/plone/eggs/ZEO-5.2.1-py3.6.egg/ZEO/ClientStorage.py", ine 562, in pack
return self._call('pack', t, wait)
File "/plone/eggs/ZEO-5.2.1-py3.6.egg/ZEO/asyncio/client.py",line 764, in call
return self.__call(self.call_threadsafe, method, args, **kw)
File "/plone/eggs/ZEO-5.2.1-py3.6.egg/ZEO/asyncio/client.py",line 743, in call
return self.wait_for_result(result, timeout)
File "/plone/eggs/ZEO-5.2.1-py3.6.egg/ZEO/asyncio/client.py",line 756, in wait_for_result
return future.result(timeout)
File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
ZEO.Exceptions.ServerException: ('builtins.UnicodeDecodeError', ('ascii', b'\x00\x00\x00\x00\x00\x0\xeb$', 6, 7, 'ordinal not in range(128)'))
Everything should have been converted with zodbupdate with command ./bin/zodbupdate --convert-py3 --file=$path_to_db --encoding-fallback latin1
. I'm not sure if the update had an error that went unnoticed when I migrated a couple months ago or if this is new. The site appears to functional normally and I can create backups, I just can't pack.
I tried copying this to a dev environment and rerunning the conversion in python 3 as described by documention for zodbupdate. It fails at the packing stage.
Packing storage ...
Traceback (most recent call last):
File "./bin/zodbupdate", line 322, in <module>
sys.exit(zodbupdate.main.main())
File "/plone/eggs/zodbupdate-1.4-py3.6.egg/zodbupdate/main.py", line 239, in main
storage.pack(time.time(), ZODB.serialize.referencesf)
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/FileStorage/FileStorage.py", line 1231, in pack
pack_result = self.packer(self, referencesf, stop, gc)
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/FileStorage/FileStorage.py", line 1184, in packer
opos = p.pack()
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/FileStorage/fspack.py", line 405, in pack
self.gc.findReachable()
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/FileStorage/fspack.py", line 191, in findReachable
self.findReachableAtPacktime([z64])
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/FileStorage/fspack.py", line 276, in findReachableAtPacktime
for oid in self.findrefs(pos):
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/FileStorage/fspack.py", line 329, in findrefs
return self.referencesf(self._file.read(dh.plen))
File "/plone/eggs/ZODB-5.5.1-py3.6.egg/ZODB/serialize.py", line 650, in referencesf
u.noload()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 6: ordinal not in range(128)
What's my recourse here? Is there a way to find these objects and remove them?