Update: was because my queue name and routing key were unicode strings - pulled the latest commit to pika which now checks for that, helped me debug. Looks like everything has to be a bytestring in order for the _marshal function to generate a valid payload, otherwise python tries to encode everything into unicode<br><br>On Monday, August 13, 2012 9:40:53 AM UTC-4, Stephen Young wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi there,<div><br>I've been using version 0.9,6 pika in a stable environment for about a month and am suddenly encountering a unicode error that looks like:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>Traceback (most recent call last):</div></div><div><div>&nbsp; File "/devel/lib/python2.7/site-<wbr>packages/Twisted-12.0.0-py2.7-<wbr>macosx-10.7-x86_64.egg/<wbr>twisted/internet/<wbr>selectreactor.py", line 150, in _doReadOrWrite</div></div><div><div>&nbsp; &nbsp; why = getattr(selectable, method)()</div></div><div><div>&nbsp; File "/devel/lib/python2.7/site-<wbr>packages/Twisted-12.0.0-py2.7-<wbr>macosx-10.7-x86_64.egg/<wbr>twisted/internet/tcp.py", line 199, in doRead</div></div><div><div>&nbsp; &nbsp; rval = self.protocol.dataReceived(<wbr>data)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/<wbr>adapters/twisted_connection.<wbr>py", line 378, in dataReceived</div></div><div><div>&nbsp; &nbsp; self._on_data_available(data)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/<wbr>connection.py", line 701, in _on_data_available</div></div><div><div>&nbsp; &nbsp; frame) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Args</div></div><div><div>&nbsp; File "/devel/src/pika/pika/<wbr>callback.py", line 161, in process</div></div><div><div>&nbsp; &nbsp; callback(*args, **keywords)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/channel.<wbr>py", line 152, in _on_synchronous_complete</div></div><div><div>&nbsp; &nbsp; self.rpc(*method)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/channel.<wbr>py", line 114, in rpc</div></div><div><div>&nbsp; &nbsp; self.send_method(method)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/channel.<wbr>py", line 121, in send_method</div></div><div><div>&nbsp; &nbsp; self.connection._send_method(<wbr>self.channel_number, method, content)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/<wbr>connection.py", line 781, in _send_method</div></div><div><div>&nbsp; &nbsp; self._send_frame(pika.frame.<wbr>Method(channel_number, method))</div></div><div><div>&nbsp; File "/devel/src/pika/pika/<wbr>adapters/twisted_connection.<wbr>py", line 355, in _send_frame</div></div><div><div>&nbsp; &nbsp; marshalled_frame = frame.marshal()</div></div><div><div>&nbsp; File "/devel/src/pika/pika/frame.<wbr>py", line 65, in marshal</div></div><div><div>&nbsp; &nbsp; return self._marshal(pieces)</div></div><div><div>&nbsp; File "/devel/src/pika/pika/frame.<wbr>py", line 40, in _marshal</div></div><div><div>&nbsp; &nbsp; len(payload)) + payload + chr(spec.FRAME_END)</div></div><div><div>exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128)</div></div></blockquote><div><br></div><div>I'm using the twisted adapter, and I have a hunch that the problem is coming from there somewhere, but I'm pretty lost as far as what to do to fix this bug. Anyone have any ideas?</div><div><br></div><div>Cheers,</div><div>Stephen&nbsp;</div></blockquote>