[Zope-DB] UnpicklingError in Ape 1.0

Shane Hathaway shane at hathawaymix.org
Sun Apr 10 02:41:41 EDT 2005


Dinh Trung Viet wrote:
> Hi all,
> 
> I had a problem when trying to use Ape 1.0 in Zope 2.7 to store data in
> MySQL database. I cannot add objects into the mount point portion (default
> is '/sql'). Here is the trace back I found in log file:
> 
> 2005-04-06T15:12:01 INFO(0) ZODB conflict error at
> /sql/manage_addProduct/OFSP/manage_addImage (1 conflicts since startup at
> 2005-04-06T15:08:45)
> ------
> 2005-04-06T15:12:02 ERROR(200) ZODB Couldn't load state for '5'
> Traceback (most recent call last):
>  File "C:\TestSites\APE\Products\Ape\lib\apelib\zodb3\connection.py", line
> 359, in setstate
>    event = osio.deserialize(oid, obj, classification, state)
>  File "C:\TestSites\APE\Products\Ape\lib\apelib\core\io.py", line 160, in
> deserialize
>    mapper.serializer.deserialize(event, state)
>  File "C:\TestSites\APE\Products\Ape\lib\apelib\core\serializers.py", line
> 121, in deserialize
>    s.deserialize(event, state)
>  File "C:\TestSites\APE\Products\Ape\lib\apelib\zodb3\serializers.py", line
> 291, in deserialize
>    s = u.load()
> UnpicklingError: unpickling stack underflow
> 
> I have no idea why. Everything works fine with filesystem storage.
> Could anyone help?!

Two ideas:

- MySQL without transaction support seems to cause this.  Make sure your
MySQL really supports transactions.

- Maybe MySQL is truncating data.  Add some code around line 291 that
watches for an exception and prints what serializers.py was trying to load.

Shane


More information about the Zope-DB mailing list