<div dir="ltr"><br><br>I have found this document and I want to follow it:<div class="Ih2E3d"><br>
<a href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/pdf/Messaging_Tutorial/Messaging_Tutorial.pdf" target="_blank">http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/pdf/Messaging_Tutorial/Messaging_Tutorial.pdf</a><br>
<br></div>but I have a problm whith this basic exapmle:<br><br>import qpid<br>import sys<br>import os<br>from qpid.util import connect<br>from qpid.connection import Connection<br>from qpid.datatypes import Message, RangedSet, uuid4<br>
from qpid.queue import Empty<br># additional imports for a given example go here<br>#----- Functions and Classes ----------------------------<br># Any functions and classes needed for a given example<br># go here.<br>#----- Initialization ------------------------------<div dir="ltr">
-----<br>
# Set parameters for login<br>host="<a href="http://127.0.0.1/" target="_blank">127.0.0.1</a>"<br>port=5672<br> <br>user="guest"<br>password="guest"<br>
# Create a connection and a session. The constructor for a session<br>
# requires a UUID to uniquely identify the session.<br>socket = connect(host, port)<br>connection = Connection (sock=socket)<br>connection.start()<br>session = connection.session(str(uuid4()))<br>#----- Main Body of Program --------------------------------<br>
# Main body of each example goes here<br>#----- Cleanup ---------------------------------------------<br># Close the session before exiting so there are no open threads.<br>session.close(timeout=10)<br><br><br><br>When I run it, that is what I see:<br>
connection = Connection (sock=socket)<br> File "/usr/lib/python2.5/site-packages/qpid/connection.py", line 52, in __init__<br> spec = load(default())<br> File "/usr/lib/python2.5/site-packages/qpid/spec.py", line 43, in default<br>
raise Exception("unable to locate the amqp specification, please set "<br>Exception:
unable to locate the amqp specification, please set the AMQP_SPEC
environment variable or supply qpid_config.py on the PYTHONPATH<br>
<br><br>I haven't understand were is the problem, may be in the version of my qpid. I tried différent version.<br><br>Thanks a lot.</div></div>