Skip to content

AttributeError: module 'asyncio' has no attribute 'exceptions' #690

@zcattacz

Description

@zcattacz
Traceback (most recent call last):
  File "/home//.local/bin/pymodbus.server", line 6, in <module>
    from pymodbus.repl.server.main import server
  File "/home//.local/lib/python3.7/site-packages/pymodbus/repl/server/main.py", line 16, in <module>
    CANCELLED_ERROR = asyncio.exceptions.CancelledError
AttributeError: module 'asyncio' has no attribute 'exceptions'

in the code

if IS_PYTHON3 and PYTHON_VERSION > (3, 7):
    CANCELLED_ERROR = asyncio.exceptions.CancelledError
else:
    CANCELLED_ERROR = asyncio.CancelledError

python 3.7 at least 3.7.3 doesn't have asyncio.exceptions
Maybe it was supposed to be >= 3.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions