An error occurred processing review comments. Perhaps the review contains a ghost user. 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/action/workspace/issue_metrics.py", line 407, in <module>
main()
~~~~^^
File "/action/workspace/issue_metrics.py", line 341, in main
issues_with_metrics, num_issues_open, num_issues_closed = get_per_issue_metrics(
~~~~~~~~~~~~~~~~~~~~~^
issues,
^^^^^^^
...<5 lines>...
env_vars=env_vars,
^^^^^^^^^^^^^^^^^^
)
^
File "/action/workspace/issue_metrics.py", line 142, in get_per_issue_metrics
pull_request = issue.issue.pull_request() # type: ignore
File "/usr/local/lib/python3.13/site-packages/github3/issues/issue.py", line 312, in pull_request
return self._instance_or_null(pulls.PullRequest, json)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/github3/models.py", line 151, in _instance_or_null
return instance_class(json, self)
File "/usr/local/lib/python3.13/site-packages/github3/models.py", line 52, in __init__
self._update_attributes(json)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/github3/pulls.py", line 713, in _update_attributes
super()._update_attributes(pull)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/github3/pulls.py", line 212, in _update_attributes
self.head = Head(pull["head"], self)
~~~~^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/github3/models.py", line 52, in __init__
self._update_attributes(json)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/github3/pulls.py", line 74, in _update_attributes
self._repo_owner = repo["owner"]["login"]
~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
No python error. Script runs properly.
Describe the bug
Hi,
Since some time I face an issue when getting some PR metrics.
Here the error:
Maybe it is related to sigmavirus24/github3.py#1161
To Reproduce
the job request
Expected behavior
No python error. Script runs properly.
Screenshots
No response
Additional context
No response