1. Looks like encoding issue but I tried to encode the associated key's value but still fails. I tried to encode using encode('UTF-8') the text field and it shows, getting converted from 'encoding' to 'str' but still fails? Exact error is here, 'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128)Traceback:Traceback (most recent call last): File "/opt/socialflow/prod/api-reporting/api-reporting/CassFH/app/c.py", line 40, in send Mutator.send(self, *a, **kw) File "/usr/local/lib/python2.6/dist-packages/pycassa/batch.py", line 126, in send allow_retries=self.allow_retries)File "/usr/local/lib/python2.6/dist-packages/pycassa/pool.py", line 124, in new_f result = f(self, *args, **kwargs)File "/usr/local/lib/python2.6/dist-packages/pycassa/cassandra/Cassandra.py", line 1005, in batch_mutate self.send_batch_mutate(mutation_map, consistency_level)File "/usr/local/lib/python2.6/dist-packages/pycassa/cassandra/Cassandra.py", line 1013, in send_batch_mutate args.write(self._oprot)File "/usr/local/lib/python2.6/dist-packages/pycassa/cassandra/Cassandra.py", line 5200, in write oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))UnicodeEncodeError: 'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128)[2013-05-20 21:31:14,450] root CRITICAL:
2. Required field 'mutation_map' was not present! Struct: batch_mutate_args(mutation_map:null, consistency_level:ONE) None /opt/socialflow/prod/api-reporting/api-reporting/CassFH/app/c.py line 44.
On Tue, May 21, 2013 at 11:26 AM, Kumar Ranjan <winne...@gmail.com> wrote:
1. Looks like encoding issue but I tried to encode the associated key's value but still fails. I tried to encode using encode('UTF-8') the text field and it shows, getting converted from 'encoding' to 'str' but still fails? Exact error is here, 'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128)Traceback:Traceback (most recent call last): File "/opt/socialflow/prod/api-reporting/api-reporting/CassFH/app/c.py", line 40, in send Mutator.send(self, *a, **kw) File "/usr/local/lib/python2.6/dist-packages/pycassa/batch.py", line 126, in send allow_retries=self.allow_retries)File "/usr/local/lib/python2.6/dist-packages/pycassa/pool.py", line 124, in new_f result = f(self, *args, **kwargs)File "/usr/local/lib/python2.6/dist-packages/pycassa/cassandra/Cassandra.py", line 1005, in batch_mutate self.send_batch_mutate(mutation_map, consistency_level)File "/usr/local/lib/python2.6/dist-packages/pycassa/cassandra/Cassandra.py", line 1013, in send_batch_mutate args.write(self._oprot)File "/usr/local/lib/python2.6/dist-packages/pycassa/cassandra/Cassandra.py", line 5200, in write oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))UnicodeEncodeError: 'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128)[2013-05-20 21:31:14,450] root CRITICAL:
Is this supposed to be a UTF8Type field? If so, pycassa is just expecting a 'unicode' or string object and will call .encode('utf-8') on it itself (although it handles it already being utf8-encoded for all cases I've seen so far).
Just noticed something, The field where it's failing does not have default type defined and as per doc, cassandra will try to store it as Hex byte arrays (ByteType) where as I am trying to insert UTF-8 encoded string, Could this be a problem?
--
You received this message because you are subscribed to a topic in the Google Groups "pycassa-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pycassa-discuss/ibC2CzLTFIY/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to pycassa-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "pycassa-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pycassa-discu...@googlegroups.com.