{"url":"https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73","repository_url":"https://api.github.com/repos/dogsheep/github-to-sqlite","labels_url":"https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73/comments","events_url":"https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73/events","html_url":"https://github.com/dogsheep/github-to-sqlite/pull/73","id":1261884917,"node_id":"PR_kwDODFdgUs45K1L3","number":73,"title":"Fixing 'NoneType' object has no attribute 'items'","user":{"login":"empjustine","id":1224205,"node_id":"MDQ6VXNlcjEyMjQyMDU=","avatar_url":"https://avatars.githubusercontent.com/u/1224205?v=4","gravatar_id":"","url":"https://api.github.com/users/empjustine","html_url":"https://github.com/empjustine","followers_url":"https://api.github.com/users/empjustine/followers","following_url":"https://api.github.com/users/empjustine/following{/other_user}","gists_url":"https://api.github.com/users/empjustine/gists{/gist_id}","starred_url":"https://api.github.com/users/empjustine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/empjustine/subscriptions","organizations_url":"https://api.github.com/users/empjustine/orgs","repos_url":"https://api.github.com/users/empjustine/repos","events_url":"https://api.github.com/users/empjustine/events{/privacy}","received_events_url":"https://api.github.com/users/empjustine/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"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","assignee":null,"author_association":"CONTRIBUTOR","type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/dogsheep/github-to-sqlite/pulls/73","html_url":"https://github.com/dogsheep/github-to-sqlite/pull/73","diff_url":"https://github.com/dogsheep/github-to-sqlite/pull/73.diff","patch_url":"https://github.com/dogsheep/github-to-sqlite/pull/73.patch","merged_at":"2022-07-18T19:40:12Z"},"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 <module>\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'","closed_by":{"login":"simonw","id":9599,"node_id":"MDQ6VXNlcjk1OTk=","avatar_url":"https://avatars.githubusercontent.com/u/9599?v=4","gravatar_id":"","url":"https://api.github.com/users/simonw","html_url":"https://github.com/simonw","followers_url":"https://api.github.com/users/simonw/followers","following_url":"https://api.github.com/users/simonw/following{/other_user}","gists_url":"https://api.github.com/users/simonw/gists{/gist_id}","starred_url":"https://api.github.com/users/simonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonw/subscriptions","organizations_url":"https://api.github.com/users/simonw/orgs","repos_url":"https://api.github.com/users/simonw/repos","events_url":"https://api.github.com/users/simonw/events{/privacy}","received_events_url":"https://api.github.com/users/simonw/received_events","type":"User","user_view_type":"public","site_admin":false},"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},"timeline_url":"https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73/timeline","performed_via_github_app":null,"state_reason":null}