{"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-620969639", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 620969639, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDk2OTYzOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T03:23:31Z", "updated_at": "2020-04-29T03:23:31Z", "author_association": "OWNER", "body": "Is it possible that your `/tmp` directory is on a different volume from the `template` folder? That could cause a problem with the symlinks.\r\n\r\nHere's the code in question:\r\n\r\nhttps://github.com/simonw/datasette/blob/89c4ddd4828623888e91a1d2cb396cba12d4e7b4/datasette/utils/__init__.py#L595-L609\r\n\r\nIt looks to me like we were expecting an `OSError` but in your environment you got a `shutil.Error` instead. So a fix could be to capture that error as well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-620970159", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 620970159, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDk3MDE1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T03:25:45Z", "updated_at": "2020-04-29T03:25:45Z", "author_association": "OWNER", "body": "https://docs.python.org/3/library/shutil.html#shutil.copytree says that `shutil.Error` should be raised here, so I think this is a bug in the `link_or_copy_directory` function.\r\n\r\nI don't have an environment that can replicate this bug. @aborruso I'm going to ship a fix in a branch that you can test against.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-620970475", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 620970475, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDk3MDQ3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T03:27:20Z", "updated_at": "2020-04-29T03:27:20Z", "author_association": "OWNER", "body": "This exception handling was introduced in #141", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/141#issuecomment-620970547", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/141", "id": 620970547, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDk3MDU0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T03:27:37Z", "updated_at": "2020-04-29T03:27:54Z", "author_association": "OWNER", "body": "This bug raised its head again in #744", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275814941, "label": "datasette publish can fail if /tmp is on a different device"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-620971526", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 620971526, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDk3MTUyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T03:32:14Z", "updated_at": "2020-04-29T03:32:14Z", "author_association": "OWNER", "body": "@aborruso I think I have a branch with a fix - could you try it out?\r\n\r\nInstall the new branch like this:\r\n\r\n```\r\npip install https://github.com/simonw/datasette/archive/issue-744.zip\r\n```\r\nThen try running `datasette publish heroku` again.\r\n\r\nIf this fixes your bug I'll merge that pull request!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/745#issuecomment-620972158", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/745", "id": 620972158, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDk3MjE1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T03:35:25Z", "updated_at": "2020-04-29T03:35:25Z", "author_association": "OWNER", "body": "Relevant documentation: https://datasette.readthedocs.io/en/stable/performance.html#hashed-url-mode", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608613033, "label": "Extract the hash-URL mechanism out into a plugin"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-621008152", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 621008152, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAwODE1Mg==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-04-29T06:05:02Z", "updated_at": "2020-04-29T06:05:02Z", "author_association": "NONE", "body": "Hi @simonw , I have installed it and I have the below errors.\r\n\r\n> Is it possible that your /tmp directory is on a different volume from the template folder? That could cause a problem with the symlinks.\r\n\r\nNo, /tmp folder is in the same volume. \r\n\r\nThank you\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/utils/__init__.py\", line 607, in link_or_copy_directory\r\n shutil.copytree(src, dst, copy_function=os.link)\r\n File \"/usr/lib/python3.7/shutil.py\", line 365, in copytree\r\n raise Error(errors)\r\nshutil.Error: [('/var/youtubeComunePalermo/processing/./template/base.html', '/tmp/tmpcqv_1i5d/templates/base.html', \"[Errno 18] Invalid cross-device link: '/var/youtubeComunePalermo/processing/./template/base.html' -> '/tmp/tmpcqv_1i5d/templates/base.html'\"), ('/var/youtubeComunePalermo/processing/./template/index.html', '/tmp/tmpcqv_1i5d/templates/index.html', \"[Errno 18] Invalid cross-device link: '/var/youtubeComunePalermo/processing/./template/index.html' -> '/tmp/tmpcqv_1i5d/templates/index.html'\")]\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/aborruso/.local/bin/datasette\", line 8, in \r\n sys.exit(cli())\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 829, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 782, in main\r\n rv = self.invoke(ctx)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 1066, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 610, in invoke return callback(*args, **kwargs)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/publish/heroku.py\", line 103, in heroku\r\n extra_metadata,\r\n File \"/usr/lib/python3.7/contextlib.py\", line 112, in __enter__\r\n return next(self.gen)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/publish/heroku.py\", line 191, in temporary_heroku_directory\r\n os.path.join(tmp.name, \"templates\"),\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/utils/__init__.py\", line 609, in link_or_copy_directory\r\n shutil.copytree(src, dst)\r\n File \"/usr/lib/python3.7/shutil.py\", line 321, in copytree\r\n os.makedirs(dst)\r\n File \"/usr/lib/python3.7/os.py\", line 221, in makedirs\r\n mkdir(name, mode)\r\nFileExistsError: [Errno 17] File exists: '/tmp/tmpcqv_1i5d/templates'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-621011554", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 621011554, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAxMTU1NA==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-04-29T06:17:26Z", "updated_at": "2020-04-29T06:17:26Z", "author_association": "NONE", "body": "A stupid note: I have no `tmpcqv_1i5d` folder in in `/tmp`.\r\n\r\nIt seems to me that it does not create any `/tmp/tmpcqv_1i5d/templates` folder (or other name folder, inside /tmp)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/746#issuecomment-621027374", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/746", "id": 621027374, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAyNzM3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T07:07:23Z", "updated_at": "2020-04-29T07:07:23Z", "author_association": "OWNER", "body": "It looks like this isn't the right fix: https://github.com/simonw/datasette/issues/744#issuecomment-621008152", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608752766, "label": "shutil.Error, not OSError"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-621027697", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 621027697, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAyNzY5Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T07:08:09Z", "updated_at": "2020-04-29T07:08:09Z", "author_association": "OWNER", "body": "What operating system are you using? I need to figure out a way to replicate this bug.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-621030783", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 621030783, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAzMDc4Mw==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-04-29T07:16:27Z", "updated_at": "2020-04-29T07:16:27Z", "author_association": "NONE", "body": "Hi @simonw it's debian as Windows Subsystem for Linux \r\n\r\n```\r\nPRETTY_NAME=\"Pengwin\"\r\nNAME=\"Pengwin\"\r\nVERSION_ID=\"10\"\r\nVERSION=\"10 (buster)\"\r\nID=debian\r\nID_LIKE=debian\r\nHOME_URL=\"https://github.com/whitewaterfoundry/Pengwin\"\r\nSUPPORT_URL=\"https://github.com/whitewaterfoundry/Pengwin\"\r\nBUG_REPORT_URL=\"https://github.com/whitewaterfoundry/Pengwin\"\r\nVERSION_CODENAME=buster\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-621036032", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 621036032, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAzNjAzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T07:29:52Z", "updated_at": "2020-04-29T07:29:52Z", "author_association": "OWNER", "body": "What should happen when a query has been successfully executed?\r\n\r\nThat depends on the query. Some queries may wish to redirect to another page. Other queries might want to show a custom message.\r\n\r\nThere should at least be a default message saying the query has been executed.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-621037724", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 621037724, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTAzNzcyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T07:34:02Z", "updated_at": "2020-04-29T07:34:02Z", "author_association": "OWNER", "body": "Concept for displaying a success message:\r\n\r\n\"fixtures__compound_three_primary_keys__1_001_rows\"\r\nCSS:\r\n\r\n```css\r\n.success {\r\n padding: 1em;\r\n border: 1px solid green;\r\n background-color: #c7fbc7;\r\n}", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-621041812", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 621041812, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTA0MTgxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T07:42:48Z", "updated_at": "2020-04-29T07:42:48Z", "author_association": "OWNER", "body": "Need to figure out what the `.json` mode for this looks like - and if there's a `.csv` mode (I think not).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/703#issuecomment-621045107", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/703", "id": 621045107, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMTA0NTEwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-29T07:49:35Z", "updated_at": "2020-04-29T07:49:35Z", "author_association": "OWNER", "body": "Adding some still-to-do items to a checklist in the description.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 585597133, "label": "WIP implementation of writable canned queries"}, "performed_via_github_app": null}