thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ned Rockson <...@tellapart.com>
Subject Re: SystemError while serializing in python
Date Tue, 01 Feb 2011 21:31:23 GMT
Ah, this is reproducible by passing in the wrong data type (e.g. set in
place of dict). Looks like there are some wires crossed here. Sorry for the
spam.

--Ned

On Tue, Feb 1, 2011 at 1:22 PM, Ned Rockson <ned@tellapart.com> wrote:

> Hi,
>
> I've recently run into a problem where I get an error thrown while
> serializing. The error is SystemError: ../Objects/dictobject.c:1562: bad
> argument to internal function. After doing some googling, this shows up in
> Cassandra's bugs around the time when new fields were added to thrift
> objects. This would be helpful, but the object I'm serializing when this is
> thrown is very shallow and contains no special objects. This is the
> definition:
>
> struct DataStorageRequest {
>
>   /* The type of request one of (get, put) */
>
>   1: required DataStorageRequestType requestType,
>
>
>   /* The list of keys for Get request. */
>
>   3: optional set<string> keys,
>
>
>   /* The map of key, values for the put request.*/
>
>   4: optional map<string, binary> keyValuesMap,
>
> }
>
>
> enum DataStorageRequestType {
>
>   GET = 1,
>
>   PUT = 2,
>
> }
>
>
> And the code that is calling it is:
>
>
> request = DataStorageRequest()
>
> request.requestType = DataStorageRequestType.PUT
>
> request.keyValuesMap = items
>
> ...
>
> <serialize thrift object>
>
>
>
> I am looking into reproducing this in a test environment but it's not
> seeming to be reproducible yet. Has anyone seen this behavior before and
> have any suggestions as to fixes they've implemented or heard of?
>
>
> Thanks,
>
> Ned
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message