Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ruppde opened this issue Jan 17, 2023 · 0 comments
Open

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

ruppde opened this issue Jan 17, 2023 · 0 comments

Comments

@ruppde
Copy link
Contributor

ruppde commented Jan 17, 2023

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

>>> from valhallaAPI.valhalla import ValhallaAPI
>>> 
>>> v = ValhallaAPI(api_key="c...")
>>> response = v.get_rule_info(rulename="APT_NK_APT37_LNK_Jul22_1")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/valhallaAPI/valhalla.py", line 145, in get_rule_info
    return json.loads(r.text)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant