Polyconseil / aioamqp

AMQP implementation using asyncio
Other
280 stars 88 forks source link

Examples crashing with Python 3.4 #11

Closed xordoquy closed 10 years ago

xordoquy commented 10 years ago

I was trying aioamqp (master) today under Python 3.4

I noticed some of the examples didn't finished well. Here's the associated stack trace.

python emit_log_topic.py
 [x] Sent 'Hello World!'
Traceback (most recent call last):
  File "emit_log_topic.py", line 38, in <module>
    asyncio.get_event_loop().run_until_complete(exchange_routing())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py", line 208, in run_until_complete
    return future.result()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/tasks.py", line 283, in _step
    result = next(coro)
  File "emit_log_topic.py", line 35, in exchange_routing
    yield from asyncio.wait_for(protocol.client_close(), timeout=10)
AttributeError: 'AmqpProtocol' object has no attribute 'client_close'
--- Logging error ---
Traceback (most recent call last):
Exception ignored in: <generator object run at 0x10c621360>
Traceback (most recent call last):
  File "/Users/xordoquy/Documents/Devs/aioamqp/aioamqp/protocol.py", line 191, in run
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 1287, in exception
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 1280, in error
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 1386, in _log
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 1396, in handle
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 1466, in callHandlers
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 837, in handle
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 961, in emit
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 890, in handleError
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/traceback.py", line 169, in print_exception
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/traceback.py", line 153, in _format_exception_iter
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/traceback.py", line 18, in _format_list_iter
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/traceback.py", line 65, in _extract_tb_or_stack_iter
  File "/Users/xordoquy/.virtualenvs/aioamqp/lib/python3.4/linecache.py", line 15, in getline
  File "/Users/xordoquy/.virtualenvs/aioamqp/lib/python3.4/linecache.py", line 41, in getlines
  File "/Users/xordoquy/.virtualenvs/aioamqp/lib/python3.4/linecache.py", line 126, in updatecache
  File "/Users/xordoquy/.virtualenvs/aioamqp/lib/python3.4/tokenize.py", line 431, in open
AttributeError: 'module' object has no attribute 'open'
trecouvr commented 10 years ago

Thank you for your report, this should be fixed now. Let me know if you still encounter any problem.

xordoquy commented 10 years ago

Thanks, looks like it's working well.