mozilla / mozilla/bugbot

[webcompat_sightline] JSONDecodeError: Expecting value: line 1 column 1

Open
#2,685 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
68
Forks
92
Avg merge
2d 2h
Merged PRs (30d)
16

Description

2025-08-18 00:42:25,305 - ERROR - Rule webcompat_sightline
Traceback (most recent call last):
  File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/requests/models.py", line 976, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 856, in run
    self.send_email(date=date)
  File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 772, in send_email
    data = self.get_email_data(date)
  File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 690, in get_email_data
    bugs = self.get_bugs(date=date)
  File "/home/rm_bot/bugbot/bugbot/bzcleaner.py", line 465, in get_bugs
    ).get_data().wait()
  File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/bugzilla.py", line 171, in get_data
    self.__get_bugs_for_history_comment()
  File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/bugzilla.py", line 554, in __get_bugs_for_history_comment
    self.__get_bugs_by_search()
  File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/libmozdata/bugzilla.py", line 619, in __get_bugs_by_search
    count = r.json()["bug_count"]
  File "/home/rm_bot/bugbot/venv/lib/python3.10/site-packages/requests/models.py", line 980, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in bugbot/bzcleaner.py at get_bugs around line 465, then follow the traceback into libmozdata/bugzilla.py, especially __get_bugs_by_search around line 619. Inspect the response being parsed by r.json() and determine the expected handling for this failure; done means the webcompat_sightline rule no longer raises this unhandled JSONDecodeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.