Stompy
MRAB
python at mrabarnett.plus.com
Sun Sep 25 14:16:46 EDT 2016
More information about the Python-list mailing list
Sun Sep 25 14:16:46 EDT 2016
- Previous message (by thread): Stompy
- Next message (by thread): Stompy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2016-09-25 18:46, Jason Friedman wrote: > My goal is to send messages to an AMQ server using Python 3.3. I found > Stompy and performed > 2to3-3.3 before building. I am open to non-Stompy solutions. > > My code: > from stompy.stomp import Stomp > my_stomp = Stomp(AMQ_HOST, AMQ_PORT) > my_stomp.connect(AMQ_USERNAME, AMQ_PASSWORD) > > > My error: > Traceback (most recent call last): > File "temp.py", line 8, in <module> > my_stomp.connect(AMQ_USERNAME, AMQ_PASSWORD) > File "/lclapps/oppen/thirdparty/stompy/stomp.py", line 48, in connect > self.frame.connect(self.sock, username=username, password=password, > clientid=clientid) > File "/lclapps/oppen/thirdparty/stompy/frame.py", line 92, in connect > self.send_frame(frame.as_string()) > File "/lclapps/oppen/thirdparty/stompy/frame.py", line 250, in send_frame > self.sock.sendall(frame) > TypeError: 'str' does not support the buffer interface > I expected you've used Unicode strings for AMQ_USERNAME and AMQ_PASSWORD, but if Stompy was written for Python 2, it'll be expecting bytestrings instead. You'll need to do more work on Stompy to fix the parts that 2to3 missed.
- Previous message (by thread): Stompy
- Next message (by thread): Stompy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list