Skip to content

ABI loading not working because of relative path #16

@marcelkb

Description

@marcelkb

Hi i am running in an issue,

when importing the lib and trying to use them i got

FileNotFoundError: [Errno 2] No such file or directory: 'sdk/reya_rpc/abis/SocketVaultWithPayload.json'

for all ABIs for brige in and out

f = open("sdk/reya_rpc/abis/SocketVaultWithPayload.json")
uses a relative path which is not pointing to the commited resource dir in the lib but to a location in my project.

tried a fix with os.chdir(pathlib.Path(file).parent.parent) # go to project root
but doesnt work
i had to make it absolute to get it working

f = open("C:/Users/[...]/venv/Lib/site-packages/sdk/reya_rpc/abis/SocketControllerWithPayload.json")

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