lsbardel/python-stdnet — Issue #43: exclude and 'ResponseError: unknown command 'ZDIFFSTORE' '
Author: kuno
Created: 2012-03-01 07:36:18+00:00
State: open

I am on redis 2.4.8,
This error message occurs when I try to use exclude method to filter some objects out.

Here is the fulll traceback:
In [18]: len(ActiveUser.objects.exclude(id__in=[1, 2, 4]).filter(id_in=[7, 8, 9]))
---------------------------------------------------------------------------
QuerySetError Traceback (most recent call last)
/home/kuno/utopia/sogoke/sogoke/ in ()
----> 1 len(ActiveUser.objects.exclude(id__in=[1, 2, 4]).filter(id_in=[7, 8, 9]))

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in __len__(self)
167
168 def __len__(self):
-->169 return self.count()
170
171 # PRIVATE METHODS

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in count(self)
149 receive any data from the server. It construct the queries and count the
150 objects on the server side.'''
-->151 self._buildquery()
152 return self.qset.count()
153

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in _buildquery(self)
178 if self.fargs:
179 self.simple = not self.filter_sets
-->180 fargs = self.aggregate(self.fargs)
181 else:
182 fargs = None

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in aggregate(self, kwargs)
192
193 def aggregate(self, kwargs):
-->194 return sorted(self._aggregate(kwargs), key = lambda x : x.name)
195
196 def _aggregate(self, kwargs):

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in _aggregate(self, kwargs)
206 if name not in fields:
207 raise QuerySetError('Could not filter on model "{0}".\
-->208 Field "{1}" does not exist.'.format(meta,name))
209 field = fields[name]
210 value = (field.serialize(value),)

QuerySetError: Could not filter on model "streams.activeuser". Field "id_in" does not exist.

In [19]: len(ActiveUser.objects.exclude(id__in=[1, 2, 4]).filter(id__in=[7, 8, 9]))
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (77, 0))

---------------------------------------------------------------------------
ResponseError Traceback (most recent call last)
/home/kuno/utopia/sogoke/sogoke/ in ()
----> 1 len(ActiveUser.objects.exclude(id__in=[1, 2, 4]).filter(id__in=[7, 8, 9]))

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in __len__(self)
167
168 def __len__(self):
-->169 return self.count()
170
171 # PRIVATE METHODS

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in count(self)
149 receive any data from the server. It construct the queries and count the
150 objects on the server side.'''
-->151 self._buildquery()
152 return self.qset.count()
153

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/orm/query.pyc in _buildquery(self)
189 self.simple = False
190 self.qset = self._meta.cursor.Query(self,fargs,eargs,
-->191 queries = self.queries)
192
193 def aggregate(self, kwargs):

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/backends/base.pyc in __init__(self, qs, fargs, eargs, timeout, queries)
35 code = self._sha.getvalue()
36 self._sha = code if not code else sha1(code).hexdigest()
--->37 self.execute()
38
39 @property

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/backends/redisb.pyc in execute(self)
236 self.query_set = key
237 else:
-->238 self.result = self.pipe.execute()
239
240 def order(self):

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/lib/redis.pyc in execute(self, with_callbacks)
1091 conn = self.connection_pool.get_connection('MULTI', self.shard_hint)
1092 try:
->1093 return execute(conn, stack, with_callbacks)
1094 except ConnectionError:
1095 conn.disconnect()

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/lib/redis.pyc in _execute_transaction(self, connection, commands, with_callbacks)
1050 parse_response = self.parse_response
1051 for i in range(len(commands)+1):
->1052 parse_response(connection, '_')
1053 # parse the EXEC.

1054 response = parse_response(connection, '_')

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/lib/redis.pyc in parse_response(self, connection, command_name, **options)
233 def parse_response(self, connection, command_name, **options):
234 "Parses a response from the Redis server"
-->235 response = connection.read_response()
236 if command_name in self.response_callbacks:
237 return self.response_callbacks[command_name](response, **options)

/home/kuno/utopia/sogoke/lib/python2.7/site-packages/stdnet/lib/connection.pyc in read_response(self)
181 response = self._parser.read_response()
182 if response.__class__ == ResponseError:
-->183 raise response
184 return response
185