{"id": 1038926741, "node_id": "PR_kwDODtX3eM497MOV", "number": 5, "state": "open", "locked": 0, "title": "The program fails when the user has no submissions", "user": {"value": 2467, "label": "fernand0"}, "body": "Tested with:\r\n \r\n hacker-news-to-sqlite user hacker-news.db fernand0\r\n\r\nResult:\r\n`\r\nTraceback (most recent call last):\r\n File \"/home/ftricas/.pyenv/versions/3.10.6/bin/hacker-news-to-sqlite\", line 8, in \r\n sys.exit(cli())\r\n File \"/home/ftricas/.pyenv/versions/3.10.6/lib/python3.10/site-packages/click/core.py\", line 1130, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"/home/ftricas/.pyenv/versions/3.10.6/lib/python3.10/site-packages/click/core.py\", line 1055, in main\r\n rv = self.invoke(ctx)\r\n File \"/home/ftricas/.pyenv/versions/3.10.6/lib/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/ftricas/.pyenv/versions/3.10.6/lib/python3.10/site-packages/click/core.py\", line 1404, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"/home/ftricas/.pyenv/versions/3.10.6/lib/python3.10/site-packages/click/core.py\", line 760, in invoke\r\n return __callback(*args, **kwargs)\r\n File \"/home/ftricas/.pyenv/versions/3.10.6/lib/python3.10/site-packages/hacker_news_to_sqlite/cli.py\", line 27, in user\r\n submitted = user.pop(\"submitted\", None) or []\r\nAttributeError: 'NoneType' object has no attribute 'pop'\r\n`\r\n\r\nThere is a problem of style with the patch (but not sure what to do) because with the new inicialization ( submitted = []) the part \r\n\r\n or []\r\n\r\nis not needed. Maybe there is a more adequate way of doing this.", "created_at": "2022-08-28T17:25:45Z", "updated_at": "2022-08-28T17:25:45Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "f0d7414305fc6cba4bcb7506b76a94938ccc7886", "assignee": null, "milestone": null, "draft": 0, "head": "ea97e640ad7a24020821fde5c647240120bd7099", "base": "c5585c103d124b23ba1e163f8857d4ba49fe452a", "author_association": "FIRST_TIME_CONTRIBUTOR", "repo": {"value": 248903544, "label": "hacker-news-to-sqlite"}, "url": "https://github.com/dogsheep/hacker-news-to-sqlite/pull/5", "merged_by": null, "auto_merge": null} {"id": 1290512937, "node_id": "PR_kwDODtX3eM5M66op", "number": 6, "state": "open", "locked": 0, "title": "Add permalink virtual field to items table", "user": {"value": 1231935, "label": "xavdid"}, "body": "I added a virtual column (no storage overhead) to the output that easily links back to the source. It works nicely out of the box with datasette:\r\n\r\n![](https://cdn.zappy.app/faf43661d539ee0fee02c0421de22d65.png)\r\n\r\nI got bit a bit by https://github.com/simonw/sqlite-utils/issues/411, so I went with a manual `table_xinfo` and creating the table via execute. Happy to adjust if that issue moves, but this seems like it works.\r\n\r\nI also added my best-guess instructions for local development on this package. I'm shooting in the dark, so feel free to replace with how you work on it locally.", "created_at": "2023-03-26T22:22:38Z", "updated_at": "2023-03-29T18:38:52Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "99bda9434e0adaa8459bc0abbe6262785cd4086c", "assignee": null, "milestone": null, "draft": 0, "head": "b04d6c76c26820f2e0b04da58dd82789e83cbb42", "base": "c5585c103d124b23ba1e163f8857d4ba49fe452a", "author_association": "FIRST_TIME_CONTRIBUTOR", "repo": {"value": 248903544, "label": "hacker-news-to-sqlite"}, "url": "https://github.com/dogsheep/hacker-news-to-sqlite/pull/6", "merged_by": null, "auto_merge": null}