{"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-635384739", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 635384739, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNTM4NDczOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-28T14:28:58Z", "updated_at": "2020-05-28T14:28:58Z", "author_association": "OWNER", "body": "This is now released. `pip install datasette==0.43` should get the fix.", "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-634850676", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 634850676, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNDg1MDY3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-27T18:18:01Z", "updated_at": "2020-05-27T18:18:01Z", "author_association": "OWNER", "body": "Thanks for helping test this @aborruso!", "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-634395343", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 634395343, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNDM5NTM0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-27T02:49:26Z", "updated_at": "2020-05-27T02:49:26Z", "author_association": "OWNER", "body": "OK, here's a new branch you can try. Install it like this:\r\n\r\n pip install https://github.com/simonw/datasette/archive/shutil-backport.zip\r\n\r\nIf it works for you I'll merge that branch into master.", "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-634254943", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 634254943, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNDI1NDk0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-26T20:15:11Z", "updated_at": "2020-05-26T20:15:11Z", "author_association": "OWNER", "body": "Oh no! It looks like `dirs_exist_ok` is Python 3.8 only. This is a bad fix, it needs to work on older Python's too. Re-opening.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 1, \"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-634254700", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 634254700, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNDI1NDcwMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-26T20:14:35Z", "updated_at": "2020-05-26T20:14:35Z", "author_association": "OWNER", "body": "What version of Python are you running?", "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-632253073", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632253073, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjI1MzA3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T17:54:55Z", "updated_at": "2020-05-21T17:54:55Z", "author_association": "OWNER", "body": "I think this is the fix! I just landed it in master.\r\n\r\n@aborruso you can install Datasette master to test it out like this:\r\n\r\n pip install https://github.com/simonw/datasette/archive/cee671a58f417f827d1735b1abaa40716534ea67.zip", "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-632237195", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632237195, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjIzNzE5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T17:23:39Z", "updated_at": "2020-05-21T17:23:48Z", "author_association": "OWNER", "body": "Actually maybe the answer here is to use `dirs_exist_ok=True` when calling `shutil.copytree`.", "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-632233393", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632233393, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjIzMzM5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T17:16:15Z", "updated_at": "2020-05-21T17:17:43Z", "author_association": "OWNER", "body": "I just hit this bug myself, or at least a variant of it!\r\n\r\nhttps://github.com/simonw/museums/runs/697063068?check_suite_focus=true\r\n\r\n```\r\n2020-05-21T17:14:02.2596471Z Traceback (most recent call last):\r\n2020-05-21T17:14:02.2599146Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/utils/__init__.py\", line 605, in link_or_copy_directory\r\n2020-05-21T17:14:02.2599861Z shutil.copytree(src, dst, copy_function=os.link)\r\n2020-05-21T17:14:02.2600377Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 554, in copytree\r\n2020-05-21T17:14:02.2600786Z return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,\r\n2020-05-21T17:14:02.2601196Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 510, in _copytree\r\n2020-05-21T17:14:02.2601580Z raise Error(errors)\r\n2020-05-21T17:14:02.2604565Z shutil.Error: [('/home/runner/work/museums/museums/templates/row-browse-museums.html', '/tmp/tmpq47xi96y/datasette/templates/row-browse-museums.html',\r\n\"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/row-browse-museums.html' -> '/tmp/tmpq47xi96y/datasette/templates/row-browse-museums.html'\"), ('/home/runner/work/museums/museums/templates/index.html', '/tmp/tmpq47xi96y/datasette/templates/index.html',\r\n\"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/index.html' -> '/tmp/tmpq47xi96y/datasette/templates/index.html'\"), ('/home/runner/work/museums/museums/templates/query-browse-search.html', '/tmp/tmpq47xi96y/datasette/templates/query-browse-search.html',\r\n\"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/query-browse-search.html' -> '/tmp/tmpq47xi96y/datasette/templates/query-browse-search.html'\"), ('/home/runner/work/museums/museums/templates/_analytics.html', '/tmp/tmpq47xi96y/datasette/templates/_analytics.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/_analytics.html' -> '/tmp/tmpq47xi96y/datasette/templates/_analytics.html'\"), ('/home/runner/work/museums/museums/templates/_museum_card.html', '/tmp/tmpq47xi96y/datasette/templates/_museum_card.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/_museum_card.html' -> '/tmp/tmpq47xi96y/datasette/templates/_museum_card.html'\"), ('/home/runner/work/museums/museums/templates/pages/about.html', '/tmp/tmpq47xi96y/datasette/templates/pages/about.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/pages/about.html' -> '/tmp/tmpq47xi96y/datasette/templates/pages/about.html'\"), ('/home/runner/work/museums/museums/templates/pages/map.html', '/tmp/tmpq47xi96y/datasette/templates/pages/map.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/pages/map.html' -> '/tmp/tmpq47xi96y/datasette/templates/pages/map.html'\")]\r\n2020-05-21T17:14:02.2605437Z \r\n2020-05-21T17:14:02.2605797Z During handling of the above exception, another exception occurred:\r\n2020-05-21T17:14:02.2606102Z \r\n2020-05-21T17:14:02.2606423Z Traceback (most recent call last):\r\n2020-05-21T17:14:02.2606817Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/bin/datasette\", line 8, in \r\n2020-05-21T17:14:02.2607189Z sys.exit(cli())\r\n2020-05-21T17:14:02.2607907Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 829, in __call__\r\n2020-05-21T17:14:02.2608347Z return self.main(*args, **kwargs)\r\n2020-05-21T17:14:02.2609024Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 782, in main\r\n2020-05-21T17:14:02.2609451Z rv = self.invoke(ctx)\r\n2020-05-21T17:14:02.2610116Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 1259, in invoke\r\n2020-05-21T17:14:02.2610550Z return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n2020-05-21T17:14:02.2611451Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 1259, in invoke\r\n2020-05-21T17:14:02.2611989Z return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n2020-05-21T17:14:02.2612682Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 1066, in invoke\r\n2020-05-21T17:14:02.2613117Z return ctx.invoke(self.callback, **ctx.params)\r\n2020-05-21T17:14:02.2613801Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 610, in invoke\r\n2020-05-21T17:14:02.2614235Z return callback(*args, **kwargs)\r\n2020-05-21T17:14:02.2614946Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/publish/cloudrun.py\", line 111, in cloudrun\r\n2020-05-21T17:14:02.2615371Z with temporary_docker_directory(\r\n2020-05-21T17:14:02.2615769Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/contextlib.py\", line 113, in __enter__\r\n2020-05-21T17:14:02.2616135Z return next(self.gen)\r\n2020-05-21T17:14:02.2616957Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/utils/__init__.py\", line 392, in temporary_docker_directory\r\n2020-05-21T17:14:02.2617403Z link_or_copy_directory(\r\n2020-05-21T17:14:02.2618298Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/utils/__init__.py\", line 607, in link_or_copy_directory\r\n2020-05-21T17:14:02.2619270Z shutil.copytree(src, dst)\r\n2020-05-21T17:14:02.2619872Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 554, in copytree\r\n2020-05-21T17:14:02.2622179Z return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,\r\n2020-05-21T17:14:02.2622609Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 455, in _copytree\r\n2020-05-21T17:14:02.2622878Z os.makedirs(dst, exist_ok=dirs_exist_ok)\r\n2020-05-21T17:14:02.2623157Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/os.py\", line 223, in makedirs\r\n2020-05-21T17:14:02.2623405Z mkdir(name, mode)\r\n2020-05-21T17:14:02.2623978Z FileExistsError: [Errno 17] File exists: '/tmp/tmpq47xi96y/datasette/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-625066876", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 625066876, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTA2Njg3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-07T06:55:04Z", "updated_at": "2020-05-07T06:55:04Z", "author_association": "OWNER", "body": "I have a Windows 10 gaming PC in the house: what steps can I take to get an environment in there that matches yours? I've not installed Python on Windows before.", "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-625061250", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 625061250, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTA2MTI1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-07T06:40:09Z", "updated_at": "2020-05-07T06:40:09Z", "author_association": "OWNER", "body": "Have a try and let me know what happens! I'd like this stuff to just work on Windows but I need to figure out how to get an environment working.", "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-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-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/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/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-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}