If you don&#x27;t have the latest asyncio version, change `ensure_future` to `async`.<p>&gt; asyncio.async(display_date(1, loop))<p>See this <a href="https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;asyncio&#x2F;pull&#x2F;242" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;asyncio&#x2F;pull&#x2F;242</a><p>The author is using the latest release of asyncio, will be good to mention that.