{"id": 1261884917, "node_id": "PR_kwDODFdgUs45K1L3", "number": 73, "title": "Fixing 'NoneType' object has no attribute 'items'", "user": {"value": 1224205, "label": "empjustine"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-06-06T13:58:11Z", "updated_at": "2022-07-18T19:40:12Z", "closed_at": "2022-07-18T19:40:12Z", "author_association": "CONTRIBUTOR", "pull_request": "dogsheep/github-to-sqlite/pulls/73", "body": "Under some conditions, GitHub caches removed starred repositories and ends up leaving dangling `None` user references.\r\n\r\n Traceback (most recent call last):\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/bin/github-to-sqlite\", line 8, in \r\n sys.exit(cli())\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py\", line 1130, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py\", line 1055, in main\r\n rv = self.invoke(ctx)\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py\", line 1657, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py\", line 1404, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py\", line 760, in invoke\r\n return __callback(*args, **kwargs)\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/cli.py\", line 181, in starred\r\n utils.save_stars(db, user, stars)\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/utils.py\", line 494, in save_stars\r\n repo_id = save_repo(db, repo)\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/utils.py\", line 308, in save_repo\r\n to_save[\"owner\"] = save_user(db, to_save[\"owner\"])\r\n File \"/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/utils.py\", line 229, in save_user\r\n for key, value in user.items()\r\n AttributeError: 'NoneType' object has no attribute 'items'", "repo": {"value": 207052882, "label": "github-to-sqlite"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null}