Skip to content

Path issue in tuf import in examples/client and examples/repository #2786

@venkat-iiita

Description

@venkat-iiita

While running /examples/client/client and /examples/repository/_simplerepo.py, encountered with errors because of the path issue with the tuf.

The following statements resolved the error.

import os

parent_dir = Path(__file__).resolve().parent.parent.parent
sys.path.append(str(parent_dir))

or it can be as follows.

import os

parent_dir = Path(__file__).resolve().parent[2]
sys.path.append(str(parent_dir))

The above can be updated in the actual code.

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