Skip to content

nfts721 access --json command is not a valid json #78

@ialberquilla

Description

@ialberquilla

Describe the bug

In order to parse the nfts721 access command --json result as json I'm getting an error because the result is not a valid json. The result is mixing common log and json output

b'Downloading the files\nDownloaded: /tmp/nevermined/swaps/bafybeial46zhj2pf4wnmp7pnmiixxlignw4knjglcj4xbts43vyo7bhmxi\n{"startTime":"2022-10-31T10:26:40.586Z","categoryName":"default","data":[{"status":0,"results":"{\\"destination\\":\\"/tmp/nevermined/swaps/\\"}"}],"level":{"level":9007199254740992,"levelStr":"MARK","colour":"grey"},"context":{},"pid":5597}\n'

To Reproduce

Steps to reproduce the behavior:

  1. Download an asset with ncli -n {network} -v nfts721 access {did} --json

Expected behavior

The returned object should be like the following

b{"startTime":"2022-10-31T10:26:40.586Z","categoryName":"default","data":[{"status":0,"results":"{\\"destination\\":\\"/tmp/nevermined/swaps/\\"}"}],"level":{"level":9007199254740992,"levelStr":"MARK","colour":"grey"},"context":{},"pid":5597}\n'

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

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