mtdcr/pysml

TypeError: timeout() got an unexpected keyword argument 'loop'

Closed this issue · 2 comments

./test_asyncio.py /dev/ttyUSB0

Traceback (most recent call last):
File "./test_asyncio.py", line 69, in
main(argv[1])
File "./test_asyncio.py", line 59, in main
loop.run_until_complete(proto.connect(loop=loop))
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/dist-packages/pysml-0.0.5-py3.8.egg/sml/asyncio.py", line 126, in connect
File "/usr/local/lib/python3.8/dist-packages/pysml-0.0.5-py3.8.egg/sml/asyncio.py", line 107, in _reconnect
TypeError: timeout() got an unexpected keyword argument 'loop'

The problem here seem to be, that /usr/local/lib/python3.8/dist-packages/async_timeout-4.0.1-py3.8.egg does not want to be provided with the loop anymore. It'll detect the current running one. So, I was able to fix the issue by changing the asyncio.py in line 107 to not provide the loop anymore.

mh7d commented

I tried to fix this issue in PR #6

mtdcr commented

Fixed by #6. Thank you!