Asyncio Graph is empty



I have been writing async code and wanted to visualise the concurrency, however the Asyncio graph is completely empty. Initially, I thought that there is something wrong my code, so I used some example snippets and the result was still the same, i.e an empty graph. Snippet:

import aiohttp
import asyncio
import async_timeout

async def fetch(session, url):
    async with async_timeout.timeout(10):
        async with session.get(url) as response:
            return await response.text()

async def main():
    async with aiohttp.ClientSession() as session:
        html = await fetch(session, '')

loop = asyncio.get_event_loop()

Is that function working or I am not doing something properly?


Edit: I am using PyCharm Professional 2018.1

Comment actions Permalink


I'm currently diving into asyncio and wanted to try this PyCharm feature. Unfortunately, I have the exact same issue.

My system:

Python 3.6 (virtualenv)

PyCharm 2018.2.4 (Professional Edition)
Build #PY-182.4505.26, built on September 19, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14 Mojave

The asyncio graph remains empty ('Nothing to show'). Here's my test code for the asyncio graph:

import asyncio

async def mycoro():
await asyncio.sleep(5)

loop = asyncio.get_event_loop()
task = asyncio.ensure_future(mycoro())

The threading graph works as expected with the following code:

import time
import threading

def run():

t = threading.Thread(target=run)


Some additional notes:

- The 'Debug' tab is not visible while the the python script is running. I also can't access it with CMD+5. So it's impossible to watch the stdout of the script. Once the script exits, the Debug tab reappears. - Edit: Found an issue for this:
- Different from the 'Run' mode, the 'Concurrent Activities Diagram' doesn't open up automatically after starting the python script. I have to click it manually. - Edit: This probably will be fixed in 2018.3:


@Stanislav Did you manage to get this diagram to work?


Edit: It does work in the PyCharm 2018.3 EAP.

See this issue:

Comment actions Permalink

Hi Sergey,

yes, the asyncio diagram works as expected in the 2018.3 EAP build. And it opens up automatically after starting.

But one issue remains: The console output of the script is not visible while running. When stopped, you can go to the Debug tab and see the output. But while the concurrency diagram runs, the debug tab is inaccessible:

Comment actions Permalink

Hi Florian,

Is it correct that your problem is solved in EAP build?

Comment actions Permalink

Thanks for letting me know.

Yes, it is indeed a corresponding issue for that problem. Thanks for posting it here.


Please sign in to leave a comment.