snstac/inrcot

AttributeError: 'NoneType' object has no attribute 'run_until_complete'

ampledata opened this issue · 2 comments

https://github.com/ampledata/inrcot/blob/441260880b5563986327d3d4fc002db5c7941784/inrcot/commands.py#L75

[tak@localhost ~]$ inrcot -c /home/tak/inrcot/config.ini
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/inrcot-1.0.3-py3.6.egg/inrcot/commands.py", line 77, in cli
    loop.run_until_complete(main(config))
AttributeError: 'NoneType' object has no attribute 'run_until_complete'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/inrcot", line 11, in <module>
    load_entry_point('inrcot==1.0.3', 'console_scripts', 'inrcot')()
  File "/usr/local/lib/python3.6/site-packages/inrcot-1.0.3-py3.6.egg/inrcot/commands.py", line 79, in cli
    loop.close()
AttributeError: 'NoneType' object has no attribute 'close'

Work-around is to change Line #75 of commans.py:

From

loop = get_running_loop()

To

loop = asyncio.get_event_loop()

This is to support Python 3.6