Skip to content

requests.exceptions.JSONDecodeError: Expecting value: line 3 column 1 (char 2) #25

@th0mcat

Description

@th0mcat

Trying to run the bot on my homeserver, getting the following error:

/opt/botpeass/venv/lib/python3.12/site-packages/aiohttp/helpers.py:6: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
  import cgi
/opt/botpeass/venv/lib/python3.12/site-packages/aiohttp/cookiejar.py:55: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  MAX_32BIT_TIME = datetime.datetime.utcfromtimestamp(2 ** 31 - 1)
/opt/botpeass/venv/lib/python3.12/site-packages/discord/player.py:30: DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13
  import audioop
Loaded keywords: {'ALL_VALID': False, 'DESCRIPTION_KEYWORDS_I': ['privilege escalation', 'escalation', 'privesc', 'high integrity', 'elevated privilege', 'escalation of privilege', ' sudo ', ' suid ', ' pe ', ' UAC ', 'User Account Control', 'linpeas', 'winpeas', 'docker', 'kubernetes', ' lxc ', 'podman'], 'DESCRIPTION_KEYWORDS': ['ThisIsACaseSensitiveExample'], 'PRODUCT_KEYWORDS_I': ['sudo', 'docker', 'kubernetes', 'lxc', 'podman', 'container', 'linux', 'windows', 'macos'], 'PRODUCT_KEYWORDS': ['ThisIsACaseSensitiveExample']}
Last new cve: 2024-12-05 05:15:00
Last modified cve: 2024-12-05 05:15:00
Traceback (most recent call last):
  File "/opt/botpeass/venv/lib/python3.12/site-packages/requests/models.py", line 974, in json
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 338, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 356, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/botpeass/botpeas.py", line 424, in <module>
    main()
  File "/opt/botpeass/botpeas.py", line 388, in main
    new_cves = get_new_cves()
               ^^^^^^^^^^^^^^
  File "/opt/botpeass/botpeas.py", line 109, in get_new_cves
    cves = get_cves(Time_Type.PUBLISHED)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/botpeass/botpeas.py", line 101, in get_cves
    return r.json()
           ^^^^^^^^
  File "/opt/botpeass/venv/lib/python3.12/site-packages/requests/models.py", line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 3 column 1 (char 2)

Looks like the botpeas_action in this GitHub repo is also getting the same error.

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