Skip to content

get_rule_info() fails if a rule has no hit yet #2

Description

@ruppde

no matches according to https://valhalla.nextron-systems.com/info/rule/APT_NK_APT37_LNK_Jul22_1 gives this error:

>>>fromvalhallaAPI.valhallaimportValhallaAPI>>>>>>v=ValhallaAPI(api_key="c...")
>>>response=v.get_rule_info(rulename="APT_NK_APT37_LNK_Jul22_1")
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/usr/local/lib/python3.8/dist-packages/valhallaAPI/valhalla.py", line145, inget_rule_inforeturnjson.loads(r.text)
File"/usr/lib/python3.8/json/__init__.py", line357, inloadsreturn_default_decoder.decode(s)
File"/usr/lib/python3.8/json/decoder.py", line337, indecodeobj, end=self.raw_decode(s, idx=_w(s, 0).end())
File"/usr/lib/python3.8/json/decoder.py", line355, inraw_decoderaiseJSONDecodeError("Expecting value", s, err.value) fromNonejson.decoder.JSONDecodeError: Expectingvalue: line1column1 (char0)

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