I have read many posts saying policy has been changed and when I updated policy then it was showing coroutines are not iterable then I used asyncio but then it was showing that this event loop is already running(see the first post) but I’m not able to solve this issue . Please suggest sample code or exact changes I need to do in this code.
RuntimeError Traceback (most recent call last)
in
7 loop = asyncio.get_event_loop()
8 # loading our neatly defined training dialogues
----> 9 training_data = loop.run_until_complete(agent.load_data(‘stories.md’))
10
11
/usr/lib/python3.6/asyncio/base_events.py in run_until_complete(self, future)
469 future.add_done_callback(_run_until_complete_cb)
470 try:
–> 471 self.run_forever()
472 except:
473 if new_task and future.done() and not future.cancelled():
/usr/lib/python3.6/asyncio/base_events.py in run_forever(self)
423 self._check_closed()
424 if self.is_running():
–> 425 raise RuntimeError(‘This event loop is already running’)
426 if events._get_running_loop() is not None:
427 raise RuntimeError(
Well you have to pip install nest_asyncio in the environment before launching the notebook, or alternatively try to do it from within the notebook, i think ! pip install nest_asyncio should do it.