Skip to content

TypeError: 'NoneType' object is not subscriptable in review["node"]["author"]["login"] #171

@krassowski

Description

@krassowski

Describe the bug

Generating a changelog fails

Reproduce the bug

github-activity jupyterlab/jupyterlab --since 791aecc -b main --kind pr
Inspecting build dependencies
Syncing dependencies
4.6.0
Getting changes to jupyterlab/jupyterlab since v4.5.0 on branch main...
Running search query:
repo:jupyterlab/jupyterlab type:pr


Found 669 items, which will take 14 pages

Downloading::   0%|          | 0/669 [00:00<?, ?issues/s]
Downloading::  15%|█▍        | 100/669 [00:03<00:22, 25.26issues/s]
Downloading::  22%|██▏       | 150/669 [00:08<00:30, 17.22issues/s]
Downloading::  30%|██▉       | 200/669 [00:12<00:32, 14.46issues/s]
Downloading::  37%|███▋      | 250/669 [00:17<00:32, 13.04issues/s]
Downloading::  45%|████▍     | 300/669 [00:22<00:32, 11.51issues/s]
Downloading::  52%|█████▏    | 350/669 [00:27<00:29, 10.80issues/s]
Downloading::  60%|█████▉    | 400/669 [00:31<00:23, 11.21issues/s]
Downloading::  67%|██████▋   | 450/669 [00:35<00:18, 11.83issues/s]
Downloading::  75%|███████▍  | 500/669 [00:39<00:14, 12.03issues/s]
Downloading::  82%|████████▏ | 550/669 [00:43<00:09, 12.14issues/s]
Downloading::  90%|████████▉ | 600/669 [00:48<00:05, 11.70issues/s]
Downloading::  97%|█████████▋| 650/669 [00:53<00:01, 10.77issues/s]
Downloading:: 100%|██████████| 669/669 [00:56<00:00, 10.27issues/s]Traceback (most recent call last):

  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/634ac751f8a58d3d4a19b63f58aad138e6355cc8/jupyter_releaser/changelog.py", line 127, in get_version_entry
    md = generate_activity_md(
         ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/github_activity/github_activity.py", line 462, in generate_activity_md
    data = get_activity(
           ^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/github_activity/github_activity.py", line 221, in get_activity
    qu.request()
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/github_activity/graphql.py", line 351, in request
    self.data["reviewers"] = self.data["reviews"].map(get_reviewers)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pandas/core/series.py", line 4675, in map
    new_values = self._map_values(func, na_action=na_action)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pandas/core/base.py", line 1022, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pandas/core/algorithms.py", line 1715, in map_array
    return lib.map_infer(values, mapper)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pandas/_libs/lib.pyx", line 3071, in pandas._libs.lib.map_infer
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/github_activity/graphql.py", line 348, in get_reviewers
    set([review["node"]["author"]["login"] for review in reviews["edges"]])
         ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Downloading:: 100%|██████████| 669/669 [00:56<00:00, 11.92issues/s]

List your environment

https://github.com/jupyterlab/jupyterlab/actions/runs/27745588562/job/82084585404

github-activity-1.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions