Re: UnicodeDecodeError

Toby Dickenson <[email protected]> Wed, 7 Dec 2005 13:23:06 +0000
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
On Tuesday 06 Dec 2005 14:39, Frank Burkhardt wrote:
> Hi,
>
> I'm using dirstorage with zope3. Sometimes it fails with an error like this
> one:
>
> File "/SCR/zope3-svn/instance/lib/python/DirectoryStorage/Full.py", line
> 187, in _vote_impl
> temp=struct.pack("!HHHIH",len(u),len(d),len(e),len(ob),0) + u + d + e + ob
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x99 in position 5:
> ordinal not in range(128)
>
> What can I do to fix that?

Im not sure. You may have to do some debugging here.


One of the variables referenced on that line must be a unicode object.

'ob' seems unlikely to be the cause, because it calculated from a list of oids 
a little earlier. 'e' seems unlikely too, because it is generated by pickling 
extension data in BaseStorage.py

'u' is the user name and 'd' is the transaction description. These seem likely 
to be the cause. Im not sure exactly where these come from in Zope3, but I am 
sure they shouldnt be unicode.

I hope that helps,


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click