Skip to content

Example example_get_by_sq.py errors on loading env #282

@jordan3825

Description

@jordan3825

Running example_get_by_sq.py fails with an error.

> py example_get_by_sq.py
Traceback (most recent call last):
  File "example_get_by_sq.py", line 12, in <module>
    axonapi.cli.cli_constants.load_dotenv()
    ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'axonius_api_client.cli' has no attribute 'cli_constants'. Did you mean: 'cf_constants'?

https://github.com/Axonius/axonius_api_client/blob/master/axonius_api_client/examples/example_get_by_sq.py#L12

Looking at some other examples, I believe the example needs to be updated to use

axonapi.constants.load_dotenv()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions