Module 'asyncio' has no attribute 'coroutine'

Hello friends,

New person here, really excited to get going on this system. Apologies if this is being posted to the wrong session (happy to move it, just let me know). I was not 100% sure if this is a bug or Saving
simply user error. I have a fresh install of pylabrobot on an Ubuntu setup running Python 3.11.4. Whenever I attempt to run the following command (part of the getting started process)

from pylabrobot.liquid_handling import LiquidHandler

I get the following error:AttributeError: module ‘asyncio’ has no attribute ‘coroutine’. Did you mean: ‘coroutines’?

AttributeError: module ‘asyncio’ has no attribute ‘coroutine’. Did you mean: ‘coroutines’?

Is this a bug or am I simply doing something braindead? The full stacktrace is below:

from pylabrobot.liquid_handling import LiquidHandler
Traceback (most recent call last):
File “”, line 1, in
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/pylabrobot/liquid_handling/”, line 3, in
from .backends import LiquidHandlerBackend, STAR
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/pylabrobot/liquid_handling/backends/”, line 8, in
from .opentrons_backend import OpentronsBackend
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/pylabrobot/liquid_handling/backends/”, line 20, in
import ot_api
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/ot_api/”, line 19, in
import ot_api.labware as labware
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/ot_api/”, line 3, in
from ot_api.decorators import request_with_run_id, command
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/ot_api/”, line 6, in
import opentrons.protocol_engine.errors as ot_errors
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/opentrons/”, line 9, in
from opentrons.hardware_control import (
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/opentrons/hardware_control/”, line 13, in
from .api import API
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/opentrons/hardware_control/”, line 38, in
from .backends import Controller, Simulator
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/opentrons/hardware_control/backends/”, line 1, in
from .controller import Controller
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/opentrons/hardware_control/backends/”, line 22, in
import aionotify # type: ignore[import]
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/aionotify/”, line 5, in
from .base import Watcher
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/aionotify/”, line 10, in
from . import aioutils
File “/home/blipchin/nexus/plr_start/env/lib/python3.11/site-packages/aionotify/”, line 122, in
AttributeError: module ‘asyncio’ has no attribute ‘coroutine’. Did you mean: ‘coroutines’?

Rick et al will be able to say for sure, but I googled the error and it came up with this:

“AttributeError: module ‘asyncio’ has no attribute ‘coroutine’.” in Python 3.11.0 - Stack Overflow

It seems PLR isn’t compatible with Python 3.11 yet, which isn’t surprising, given it was released only a few weeks ago. Try Python 3.10 and see if that works.


Welcome to the forum, @lenorin!

Yes, as @Gareth said this is because PLR unfortunately does not support python 3.11 yet. This is due to the opentrons dependency not supporting 3.11. I have a PR for a fix open, but I’m afraid beyond that it’s outside of my control.

I will actually make this import optional so you can use 3.11 for everything else very soon. Until then, please use 3.8-3.10.

1 Like