{"id":957,"hash":"c07f78e66b86fea603a0d44c0d2cfe38f57845e27c7200088a1e01f01cd425b8","pattern":"Python3.6 AttributeError: module &#39;asyncio&#39; has no attribute &#39;run&#39;","full_message":"I tried to read https://hackernoon.com/asynchronous-python-45df84b82434.\nIt's about asynchronous python and I tried the code from this, but I'm getting a weird Error.\nThe code is:\n`\n\nimport asyncio\nimport aiohttp\n\nurls = ['http://www.google.com', 'http://www.yandex.ru', 'http://www.python.org']\n\nasync def call_url(url):\n    print('Starting {}'.format(url))\n    response = await aiohttp.ClientSession().get(url)\n    data = await response.text()\n    print('{}: {} bytes: {}'.format(url, len(data), data))\n    return data\n\nfutures = [call_url(url) for url in urls]\n\nasyncio.run(asyncio.wait(futures))\n\nWhen I try to run it says:\n\nTraceback (most recent call last):\n  File \"test.py\", line 15, in <module>\n    asyncio.run(asyncio.wait(futures))\nAttributeError: module 'asyncio' has no attribute 'run'\nsys:1: RuntimeWarning: coroutine 'call_url' was never awaited\n\nI dont have any files named ayncio and I have proof:\n\n>>> asyncio\n<module 'asyncio' from '/usr/lib/python3.6/asyncio/__init__.py'>","ecosystem":"pypi","package_name":"python-3.6","package_version":null,"solution":"asyncio.run is a Python 3.7 addition. In 3.5-3.6, your example is roughly equivalent to:\n\nimport asyncio\n\nfutures = [...]\nloop = asyncio.get_event_loop()\nloop.run_until_complete(asyncio.wait(futures))","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/52796630/python3-6-attributeerror-module-asyncio-has-no-attribute-run","votes":98,"created_at":"2026-04-19T04:52:05.808655+00:00","updated_at":"2026-04-19T04:52:05.808655+00:00"}