Skip to content

Circular import when trying to use library examples #2

@Es-ci

Description

@Es-ci

When trying to use the example-async.py or example-sync there is a circular import error

python3 example-sync.py
Traceback (most recent call last):
File "/Users/user/Repos/pyavcontrol/example-sync.py", line 12, in
from pyavcontrol.helper import construct_synchronous_client
File "/Users/user/Repos/pyavcontrol/pyavcontrol/init.py", line 5, in
from .helper import construct_async_client, construct_synchronous_client
File "/Users/user/Repos/pyavcontrol/pyavcontrol/helper.py", line 10, in
from pyavcontrol import DeviceClient, DeviceModelLibrary
ImportError: cannot import name 'DeviceModelLibrary' from partially initialized module 'pyavcontrol' (most likely due to a circular import) (/Users/user/Repos/pyavcontrol/pyavcontrol/init.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions