Skip to content

False positive errors #17

@bleal-kitmanlabs

Description

@bleal-kitmanlabs

Hey Folks,

Running the lib here, I got tons of this error (which sounds false positive):

[2023-03-08 09:35:39]-ERROR-[jsonpath] string indices must be integers, not 'str'
2023-03-08 09:35:39,786 [jsonpath] [ERROR] string indices must be integers, not 'str'

My JsonPath with filter:

JSONPath(f'$.[?(@.user=="{user}")]').parse(all_access)

My json:

[
 {'time': '2023-01-02T20:32:01Z', 'user': 'user1' },
 {'time': '2023-01-02T20:32:03Z', 'user': 'user2'},
 {'time': '2023-01-02T20:32:03Z', 'user': 'user1'}
]

What could be the fix as I'm not considering to just leave the error avoiding logs from this lib?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions