{"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-625060561", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 625060561, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTA2MDU2MQ==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-07T06:38:24Z", "updated_at": "2020-05-07T06:38:24Z", "author_association": "NONE", "body": "Hi @simonw probably I could try to do it in Python for windows. I do not like to do these things in win enviroment.\r\n\r\nBecause probably WSL Linux env (in which I do a lot of great things) is not an environment that will be tested for datasette.\r\n\r\nIn win I shouldn't have any problems. Am I right?", "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-625066073", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 625066073, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTA2NjA3Mw==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-07T06:53:09Z", "updated_at": "2020-05-07T06:53:09Z", "author_association": "NONE", "body": "@simonw another error starting from Windows.\r\n\r\nI run\r\n\r\n```\r\ndatasette publish heroku -n comunepa --template-dir template commissioniComunePalermo.db\r\n```\r\n\r\nAnd I have\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"c:\\python37\\lib\\runpy.py\", line 193, in _run_module_as_main\r\n \"__main__\", mod_spec)\r\n File \"c:\\python37\\lib\\runpy.py\", line 85, in _run_code\r\n exec(code, run_globals)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\Scripts\\datasette.exe\\__main__.py\", line 9, in \r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 829, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 782, in main\r\n rv = self.invoke(ctx)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 1066, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 610, in invoke\r\n return callback(*args, **kwargs)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\datasette\\publish\\heroku.py\", line 53, in heroku\r\n line.split()[0] for line in check_output([\"heroku\", \"plugins\"]).splitlines()\r\n File \"c:\\python37\\lib\\subprocess.py\", line 395, in check_output\r\n **kwargs).stdout\r\n File \"c:\\python37\\lib\\subprocess.py\", line 472, in run\r\n with Popen(*popenargs, **kwargs) as process:\r\n File \"c:\\python37\\lib\\subprocess.py\", line 775, in __init__\r\n restore_signals, start_new_session)\r\n File \"c:\\python37\\lib\\subprocess.py\", line 1178, in _execute_child\r\n startupinfo)\r\nFileNotFoundError: [WinError 2] The specified file could not be found\r\n```\r\n\r\n\r\n[files.zip](https://github.com/simonw/datasette/files/4591173/files.zip)\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-625083715", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 625083715, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTA4MzcxNQ==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-07T07:34:18Z", "updated_at": "2020-05-07T07:34:18Z", "author_association": "NONE", "body": "In Windows I'm not very strong. I use debian (inside WSL).\r\n\r\nHowever these are the possible steps:\r\n\r\n- I have installed Python 3 for win (I have 3.7.3);\r\n- I have installed heroku cli for win64 and logged in;\r\n- I have installed datasette running `python -m pip install --upgrade --user datasette`.\r\n\r\nIt's a very basic Python env that I do not use. This time only to reach my goal: try to publish using custom template", "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-625091976", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 625091976, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTA5MTk3Ng==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-07T07:51:25Z", "updated_at": "2020-05-07T07:51:25Z", "author_association": "NONE", "body": "I have installed `heroku plugins:install heroku-builds`, but I have the same error.\r\n\r\nThen I have removed from `datasette\\publish\\heroku.py`\r\n\r\n```python\r\n # Check for heroku-builds plugin\r\n plugins = [\r\n line.split()[0] for line in check_output([\"heroku\", \"plugins\"]).splitlines()\r\n ]\r\n if b\"heroku-builds\" not in plugins:\r\n click.echo(\r\n \"Publishing to Heroku requires the heroku-builds plugin to be installed.\"\r\n )\r\n click.confirm(\r\n \"Install it? (this will run `heroku plugins:install heroku-builds`)\",\r\n abort=True,\r\n )\r\n call([\"heroku\", \"plugins:install\", \"heroku-builds\"])\r\n```\r\n\r\nAnd now I have\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\datasette\\publish\\heroku.py\", line 210, in temporary_heroku_directory\r\n yield\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\datasette\\publish\\heroku.py\", line 96, in heroku\r\n list_output = check_output([\"heroku\", \"apps:list\", \"--json\"]).decode(\r\n File \"c:\\python37\\lib\\subprocess.py\", line 395, in check_output\r\n **kwargs).stdout\r\n File \"c:\\python37\\lib\\subprocess.py\", line 472, in run\r\n with Popen(*popenargs, **kwargs) as process:\r\n File \"c:\\python37\\lib\\subprocess.py\", line 775, in __init__\r\n restore_signals, start_new_session)\r\n File \"c:\\python37\\lib\\subprocess.py\", line 1178, in _execute_child\r\n startupinfo)\r\nFileNotFoundError: [WinError 2] The specified file could not be found\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"c:\\python37\\lib\\runpy.py\", line 193, in _run_module_as_main\r\n \"__main__\", mod_spec)\r\n File \"c:\\python37\\lib\\runpy.py\", line 85, in _run_code\r\n exec(code, run_globals)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\Scripts\\datasette.exe\\__main__.py\", line 9, in \r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 829, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 782, in main\r\n rv = self.invoke(ctx)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 1066, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\click\\core.py\", line 610, in invoke\r\n return callback(*args, **kwargs)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\datasette\\publish\\heroku.py\", line 120, in heroku\r\n call([\"heroku\", \"builds:create\", \"-a\", app_name, \"--include-vcs-ignore\"])\r\n File \"c:\\python37\\lib\\contextlib.py\", line 130, in __exit__\r\n self.gen.throw(type, value, traceback)\r\n File \"C:\\Users\\aborr\\AppData\\Roaming\\Python\\Python37\\site-packages\\datasette\\publish\\heroku.py\", line 213, in temporary_heroku_directory\r\n tmp.cleanup()\r\n File \"c:\\python37\\lib\\tempfile.py\", line 809, in cleanup\r\n _shutil.rmtree(self.name)\r\n File \"c:\\python37\\lib\\shutil.py\", line 513, in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\n File \"c:\\python37\\lib\\shutil.py\", line 401, in _rmtree_unsafe\r\n onerror(os.rmdir, path, sys.exc_info())\r\n File \"c:\\python37\\lib\\shutil.py\", line 399, in _rmtree_unsafe\r\n os.rmdir(path)\r\nPermissionError: [WinError 32] Unable to access file. The file is being used by another process: 'C:\\\\Users\\\\aborr\\\\AppData\\\\Local\\\\Temp\\\\tmpkcxy8i_q'\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/761#issuecomment-625003013", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/761", "id": 625003013, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTAwMzAxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-07T03:07:55Z", "updated_at": "2020-05-07T03:09:05Z", "author_association": "OWNER", "body": "Here's another demo I built using this feature: https://observablehq.com/@simonw/datasette-table-diagram\r\n\r\n\"Datasette_foreign_key_diagram___Simon_Willison___Observable\"\r\n\r\nRunning on this query:\r\n\r\n```sql\r\nselect\r\n sqlite_master.name as table_from,\r\n fk_info.[from] as column_from,\r\n fk_info.[table] as table_to,\r\n fk_info.[to] as column_to\r\nfrom\r\n sqlite_master\r\n join pragma_foreign_key_list(sqlite_master.name) as fk_info\r\norder by\r\n sqlite_master.name\r\n```\r\nSee https://github-to-sqlite.dogsheep.net/github?sql=select%0D%0A++sqlite_master.name+as+table_from%2C%0D%0A++fk_info.%5Bfrom%5D+as+column_from%2C%0D%0A++fk_info.%5Btable%5D+as+table_to%2C%0D%0A++fk_info.%5Bto%5D+as+column_to%0D%0Afrom%0D%0A++sqlite_master%0D%0A++join+pragma_foreign_key_list%28sqlite_master.name%29+as+fk_info%0D%0Aorder+by%0D%0A++sqlite_master.name", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 613467382, "label": "Allow-list pragma_table_info(tablename) and similar"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/648#issuecomment-625286519", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 625286519, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTI4NjUxOQ==", "user": {"value": 28694175, "label": "chekos"}, "created_at": "2020-05-07T14:23:22Z", "updated_at": "2020-05-07T14:28:33Z", "author_association": "NONE", "body": "Hi! I'm using datasette on this repository: https://github.com/chekos/RIPA-2018-datasette\r\n\r\nand on my local machine i can see an /about page i created but when i deploy to heroku i get a 404 (http://ripa-2018-db.herokuapp.com)\r\n\r\n\"Screen\r\n\r\n\r\nI bumped datasette in my requirements file to 0.41 so I'm 100% what the issue is \ud83e\udd14 \r\n\r\nDo you have any idea what could be the problem? \ud83d\udc40 \r\n\r\nEDIT: for context, I have a templates directory with a pages/about.html file in https://github.com/chekos/RIPA-2018-datasette/tree/master/datasette/templates", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 534492501, "label": "Mechanism for adding arbitrary pages like /about"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/648#issuecomment-625321121", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 625321121, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTMyMTEyMQ==", "user": {"value": 28694175, "label": "chekos"}, "created_at": "2020-05-07T15:21:19Z", "updated_at": "2020-05-07T15:21:19Z", "author_association": "NONE", "body": "It seems that heroku wasn't updating to 0.41 on deployment. \r\n\r\nHad to add `--branch 0.41` and that solved it! Heroku caches dependencies \r\n\"Screen\r\n\r\nand (i think) because the `requirements.txt` doesn't specify the datasette version, it didn't update from 0.40 to 0.41 on heroku even though it was specified on my local requirements file as `datasette >= 0.41`\r\n\r\nThese are the lines that gave me an idea on how to solve it:\r\nhttps://github.com/simonw/datasette/blob/182e5c8745c94576718315f7596ccc81e5e2417b/datasette/publish/heroku.py#L164-L186", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 534492501, "label": "Mechanism for adding arbitrary pages like /about"}, "performed_via_github_app": null}