<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; "><div style="font-family: Calibri, sans-serif; ">Thanks for the quick reply Gavin.</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">I've got no idea how my install would be non-standard. It's an Ubuntu 11.04 box, recently updated via "sudo apt-get upgrade". FWIW, my Python 2.7 install is based in /usr/local/lib/python2.7, so the /local/ in the path isn't surprising (to me at least...)</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">Per the instructions on the RabbitMq site, I did: "<span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">sudo pip install <span class="nv">pika</span><span class="o">==</span>0.9.5".</span>&nbsp;I didn't notice any errors:</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">----------------</div><div style="font-family: Calibri, sans-serif; "><div style="font-family: Calibri, sans-serif; ">mpietrek@rabbitmq:/usr/local/lib/python2.7$sudo pip install pika==0.9.5</div><div style="font-family: Calibri, sans-serif; ">Downloading/unpacking pika==0.9.5</div><div style="font-family: Calibri, sans-serif; ">&nbsp; Downloading pika-0.9.5.tar.gz</div><div style="font-family: Calibri, sans-serif; ">&nbsp; Running setup.py egg_info for package pika</div><div style="font-family: Calibri, sans-serif; ">&nbsp; &nbsp;&nbsp;</div><div style="font-family: Calibri, sans-serif; ">Installing collected packages: pika</div><div style="font-family: Calibri, sans-serif; ">&nbsp; Running setup.py install for pika</div><div style="font-family: Calibri, sans-serif; ">&nbsp; &nbsp;&nbsp;</div><div style="font-family: Calibri, sans-serif; ">Successfully installed pika</div><div style="font-family: Calibri, sans-serif; ">Cleaning up...</div><div>----------------</div></div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">The output from Interactive Python that you requested:</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; "><div style="font-family: Calibri, sans-serif; ">Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)&nbsp;</div><div style="font-family: Calibri, sans-serif; ">[GCC 4.5.2] on linux2</div><div style="font-family: Calibri, sans-serif; ">Type "help", "copyright", "credits" or "license" for more information.</div><div style="font-family: Calibri, sans-serif; ">&gt;&gt;&gt; import pika</div><div style="font-family: Calibri, sans-serif; ">&gt;&gt;&gt; pika.__version__</div><div style="font-family: Calibri, sans-serif; ">'0.9.5'</div><div><br></div><div>Also, FWIW, the contents of &nbsp;/usr/local/lib/python2.7/dist-packages/pika-0.9.5.egg-info/PKG_INFO&nbsp;are:</div><div><br></div></div><div style="font-family: Calibri, sans-serif; "><div style="font-family: Calibri, sans-serif; ">Metadata-Version: 1.0</div><div style="font-family: Calibri, sans-serif; ">Name: pika</div><div style="font-family: Calibri, sans-serif; ">Version: 0.9.5</div><div style="font-family: Calibri, sans-serif; ">Summary: Pika Python AMQP Client Library</div><div style="font-family: Calibri, sans-serif; ">Home-page: http://pika.github.com/</div><div style="font-family: Calibri, sans-serif; ">Author: Gavin M. Roy</div><div style="font-family: Calibri, sans-serif; ">Author-email: gmr@myyearbook.com</div><div style="font-family: Calibri, sans-serif; ">License: MPL v1.1 and GPL v2.0 or newer</div><div style="font-family: Calibri, sans-serif; ">Description: Pika is a pure-Python implementation of the AMQP 0-9-1 protocol that</div><div style="font-family: Calibri, sans-serif; ">&nbsp; &nbsp; &nbsp; &nbsp; tries to stay fairly independent of the underlying network support</div><div style="font-family: Calibri, sans-serif; ">&nbsp; &nbsp; &nbsp; &nbsp; library. Pika was developed primarily for use with RabbitMQ, but</div><div style="font-family: Calibri, sans-serif; ">&nbsp; &nbsp; &nbsp; &nbsp; should also work with other AMQP 0-9-1 brokers.</div><div style="font-family: Calibri, sans-serif; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div style="font-family: Calibri, sans-serif; ">Platform: UNKNOWN</div><div style="font-family: Calibri, sans-serif; ">Classifier: Development Status :: 4 - Beta</div><div style="font-family: Calibri, sans-serif; ">Classifier: Intended Audience :: Developers</div><div style="font-family: Calibri, sans-serif; ">Classifier: License :: OSI Approved :: GNU General Public License (GPL)</div><div style="font-family: Calibri, sans-serif; ">Classifier: License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)</div><div style="font-family: Calibri, sans-serif; ">Classifier: Operating System :: OS Independent</div><div style="font-family: Calibri, sans-serif; ">Classifier: Topic :: Communications</div><div style="font-family: Calibri, sans-serif; ">Classifier: Topic :: Internet</div><div style="font-family: Calibri, sans-serif; ">Classifier: Topic :: Software Development :: Libraries</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">Thanks much for your help,</div><div style="font-family: Calibri, sans-serif; "><br></div><div style="font-family: Calibri, sans-serif; ">Matt</div><div style="font-family: Calibri, sans-serif; "><br></div></div><span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif; "><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> "Gavin M. Roy" &lt;<a href="mailto:gmr@myyearbook.com">gmr@myyearbook.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Tue, 16 Aug 2011 12:32:44 -0400<br><span style="font-weight:bold">To: </span> Matt Pietrek &lt;<a href="mailto:mpietrek@hotmail.com">mpietrek@hotmail.com</a>&gt;<br><span style="font-weight:bold">Cc: </span> Marek Majkowski &lt;<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>&gt;, &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> Re: [rabbitmq-discuss] NotImplementedError: &lt;class 'pika.spec.CancelOk'&gt;<br></div><div><br></div>
                <div>
                    It looks like to me that you have a non-standard pika install, perhaps the new debian package?
                </div><div><br></div><div>I say that because I see:</div><div><br></div><div><blockquote type="cite" style="border-left-style: solid; border-left-color: rgb(0, 33, 98); color: rgb(0, 33, 98); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; margin-left: 0px; padding-left: 10px; padding-right: 0px; margin-right: 0px; "><span><div><div><blockquote type="cite" style="border-left-style: solid; border-left-color: rgb(0, 33, 98); color: rgb(0, 33, 98); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; margin-left: 0px; padding-left: 10px; padding-right: 0px; margin-right: 0px; "><div><blockquote type="cite" style="border-left-style: solid; border-left-color: rgb(0, 33, 98); color: rgb(0, 33, 98); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; margin-left: 0px; padding-left: 10px; padding-right: 0px; margin-right: 0px; "><div>/usr/local/lib/python2.7/dist-packages/pika/connection.py</div></blockquote></div></blockquote></div></div></span></blockquote><div>And I'd expect something like:</div><div><br></div><div>/usr/lib/python2.7/site-packages/pika/connection.py</div><div><br></div><div>Can you use slocate or find to see if you have more than one version of pika installed?</div><div><br></div><div>What happens when you run the following in python2.7 interactively?</div><div><br></div><div>import pika</div><div>pika.__version__</div><div>&nbsp;</div></div>
                <div></div>
                 
                <p style="color: #A0A0A8;">On Tuesday, August 16, 2011 at 12:18 PM, Matt Pietrek wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>Alas, no luck with a Pika reinstall. I did a "pip uninstall" of what was<br>there, verified the files were removed, then "pip install".<br><br>All other aspects of my Pika-based code seem to work. I'm sending and<br>receiving 1000's of messages before shutting down. It's only at shutdown<br>where the problem occurs.<br><br>Does my shutdown sequence look OK? That is, calling<br>channel.stop_consuming() from a different thread than I called<br>.start_consuming on?<br><br><br><br>On 8/16/11 4:29 AM, "Marek Majkowski" &lt;<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>&gt; wrote:<br><br><blockquote type="cite"><div>On Tue, Aug 16, 2011 at 00:36, Matt Pietrek &lt;<a href="mailto:mpietrek@hotmail.com">mpietrek@hotmail.com</a>&gt; wrote:<br><blockquote type="cite"><div>I'm getting the following error from code that used to work without<br>error until I did an "apt-get upgrade" today.<br><br>This is an Ubuntu 11.04 system running Python 2.7 and Pika 0.95. Any<br>clues what's happening?<br></div></blockquote><br>Nope. Maybe it's just a python installation issue?<br><br>Can you try removing pika and installing it again? Or maybe<br>installing a fresh local copy (for example using venv)?<br><br>Cheers,<br> Marek<br><br><blockquote type="cite"><div>Traceback (most recent call last):<br> File "/usr/lib/python2.7/threading.py", line 552, in<br>__bootstrap_inner<br>   self.run()<br> File "ConfigMgr.py", line 101, in run<br>   self.channel.start_consuming()<br> File "/usr/local/lib/python2.7/dist-packages/pika/adapters/<br>blocking_connection.py", line 293, in start_consuming<br>   self.transport.connection.process_data_events()<br> File "/usr/local/lib/python2.7/dist-packages/pika/adapters/<br>blocking_connection.py", line 94, in process_data_events<br>   self._handle_read()<br> File "/usr/local/lib/python2.7/dist-packages/pika/adapters/<br>base_connection.py", line 162, in _handle_read<br>   self._on_data_available(data)<br> File "/usr/local/lib/python2.7/dist-packages/pika/connection.py",<br>line 599, in _on_data_available<br>   self._channels[frame.channel_number].transport.deliver(frame)<br> File "/usr/local/lib/python2.7/dist-packages/pika/channel.py", line<br>64, in deliver<br>   self.frame_dispatcher.process(frame)<br> File "/usr/local/lib/python2.7/dist-packages/pika/frame.py", line<br>202, in process<br>   self._handler(frame)<br> File "/usr/local/lib/python2.7/dist-packages/pika/frame.py", line<br>220, in _handle_method_frame<br>   raise NotImplementedError(frame.method.__class__)<br>NotImplementedError: &lt;class 'pika.spec.CancelOk'&gt;<br><br>Here's what my code looks like:<br><br>class ListenForLongRunningEventCompletion(threading.Thread):<br>   def run(self):<br>       self.connection =<br>pika.BlockingConnection(pika.ConnectionParameters(host=MQ_BINDING))<br>       self.channel = self.connection.channel()<br><br>       self.channel.queue_declare(queue=RESPONSE_QUEUE_NAME)<br>       self.channel.basic_consume(ResponseCallback,<br>                             queue=RESPONSE_QUEUE_NAME,<br>                             no_ack=True)<br>       self.channel.start_consuming()<br><br>   def shutdown(self):<br>       self.channel.stop_consuming()<br><br>def ResponseCallback(ch, method, properties, body):<br>   print "Long Running Task response({0})".format(body)<br><br><br>#========================================================================<br>======<br>#<br># Main program<br>#<br><br>#========================================================================<br>======<br><br>if __name__ == '__main__':<br>   listener = ListenForLongRunningEventCompletion()<br>   listener.start()<br><br>   # Main app logic - not important here<br><br>   # Shut down the connections we've opened up<br>   listener.shutdown()<br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></div></blockquote></div></blockquote><br><br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div></span></body></html>