github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/761#issuecomment-625003013 | https://api.github.com/repos/simonw/datasette/issues/761 | 625003013 | MDEyOklzc3VlQ29tbWVudDYyNTAwMzAxMw== | 9599 | 2020-05-07T03:07:55Z | 2020-05-07T03:09:05Z | OWNER | Here's another demo I built using this feature: https://observablehq.com/@simonw/datasette-table-diagram <img width="995" alt="Datasette_foreign_key_diagram___Simon_Willison___Observable" src="https://user-images.githubusercontent.com/9599/81250291-6c89d600-8fd5-11ea-859c-d99a0de0531a.png"> Running on this query: ```sql select sqlite_master.name as table_from, fk_info.[from] as column_from, fk_info.[table] as table_to, fk_info.[to] as column_to from sqlite_master join pragma_foreign_key_list(sqlite_master.name) as fk_info order by sqlite_master.name ``` See 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 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 613467382 | |
https://github.com/simonw/datasette/issues/744#issuecomment-625060561 | https://api.github.com/repos/simonw/datasette/issues/744 | 625060561 | MDEyOklzc3VlQ29tbWVudDYyNTA2MDU2MQ== | 30607 | 2020-05-07T06:38:24Z | 2020-05-07T06:38:24Z | NONE | Hi @simonw probably I could try to do it in Python for windows. I do not like to do these things in win enviroment. Because probably WSL Linux env (in which I do a lot of great things) is not an environment that will be tested for datasette. In win I shouldn't have any problems. Am I right? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 608058890 | |
https://github.com/simonw/datasette/issues/744#issuecomment-625061250 | https://api.github.com/repos/simonw/datasette/issues/744 | 625061250 | MDEyOklzc3VlQ29tbWVudDYyNTA2MTI1MA== | 9599 | 2020-05-07T06:40:09Z | 2020-05-07T06:40:09Z | OWNER | 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. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 608058890 | |
https://github.com/simonw/datasette/issues/744#issuecomment-625066073 | https://api.github.com/repos/simonw/datasette/issues/744 | 625066073 | MDEyOklzc3VlQ29tbWVudDYyNTA2NjA3Mw== | 30607 | 2020-05-07T06:53:09Z | 2020-05-07T06:53:09Z | NONE | @simonw another error starting from Windows. I run ``` datasette publish heroku -n comunepa --template-dir template commissioniComunePalermo.db ``` And I have ``` Traceback (most recent call last): File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\aborr\AppData\Roaming\Python\Python37\Scripts\datasette.exe\__main__.py", line 9, in <module> File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 829, in __call__ return self.main(*args, **kwargs) File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 610, in invoke return callback(*args, **kwargs) File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\datasette\publish\heroku.py", line 53, in heroku line.split()[0] for line in check_output(["heroku", "plugins"]).splitlines() File "c:\python37\lib\subprocess.py", line 395, in check_output **kwargs).stdout File "c:\python37\lib\subprocess.py", line 472, in run with Popen(*popenargs, **kwargs) as process: File "c:\python37\lib\subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "c:\python37\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2]… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 608058890 | |
https://github.com/simonw/datasette/issues/744#issuecomment-625066876 | https://api.github.com/repos/simonw/datasette/issues/744 | 625066876 | MDEyOklzc3VlQ29tbWVudDYyNTA2Njg3Ng== | 9599 | 2020-05-07T06:55:04Z | 2020-05-07T06:55:04Z | OWNER | 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. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 608058890 | |
https://github.com/simonw/datasette/issues/744#issuecomment-625083715 | https://api.github.com/repos/simonw/datasette/issues/744 | 625083715 | MDEyOklzc3VlQ29tbWVudDYyNTA4MzcxNQ== | 30607 | 2020-05-07T07:34:18Z | 2020-05-07T07:34:18Z | NONE | In Windows I'm not very strong. I use debian (inside WSL). However these are the possible steps: - I have installed Python 3 for win (I have 3.7.3); - I have installed heroku cli for win64 and logged in; - I have installed datasette running `python -m pip install --upgrade --user datasette`. It's a very basic Python env that I do not use. This time only to reach my goal: try to publish using custom template | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 608058890 | |
https://github.com/simonw/datasette/issues/744#issuecomment-625091976 | https://api.github.com/repos/simonw/datasette/issues/744 | 625091976 | MDEyOklzc3VlQ29tbWVudDYyNTA5MTk3Ng== | 30607 | 2020-05-07T07:51:25Z | 2020-05-07T07:51:25Z | NONE | I have installed `heroku plugins:install heroku-builds`, but I have the same error. Then I have removed from `datasette\publish\heroku.py` ```python # Check for heroku-builds plugin plugins = [ line.split()[0] for line in check_output(["heroku", "plugins"]).splitlines() ] if b"heroku-builds" not in plugins: click.echo( "Publishing to Heroku requires the heroku-builds plugin to be installed." ) click.confirm( "Install it? (this will run `heroku plugins:install heroku-builds`)", abort=True, ) call(["heroku", "plugins:install", "heroku-builds"]) ``` And now I have ``` Traceback (most recent call last): File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\datasette\publish\heroku.py", line 210, in temporary_heroku_directory yield File "C:\Users\aborr\AppData\Roaming\Python\Python37\site-packages\datasette\publish\heroku.py", line 96, in heroku list_output = check_output(["heroku", "apps:list", "--json"]).decode( File "c:\python37\lib\subprocess.py", line 395, in check_output **kwargs).stdout File "c:\python37\lib\subprocess.py", line 472, in run with Popen(*popenargs, **kwargs) as process: File "c:\python37\lib\subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "c:\python37\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The specified file could not be found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\aborr\AppData\Roaming\Python\Python37\Scripts\datasette.exe\__main__.py", line 9, in <module> File "C:\Users\aborr\AppData\Roaming\Python\Python… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 608058890 | |
https://github.com/simonw/datasette/issues/648#issuecomment-625286519 | https://api.github.com/repos/simonw/datasette/issues/648 | 625286519 | MDEyOklzc3VlQ29tbWVudDYyNTI4NjUxOQ== | 28694175 | 2020-05-07T14:23:22Z | 2020-05-07T14:28:33Z | NONE | Hi! I'm using datasette on this repository: https://github.com/chekos/RIPA-2018-datasette and 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) <img width="629" alt="Screen Shot 2020-05-07 at 7 04 43 AM" src="https://user-images.githubusercontent.com/28694175/81303797-0af75500-9031-11ea-8a02-adee7a2374ea.png"> I bumped datasette in my requirements file to 0.41 so I'm 100% what the issue is 🤔 Do you have any idea what could be the problem? 👀 EDIT: 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 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 534492501 | |
https://github.com/simonw/datasette/issues/648#issuecomment-625321121 | https://api.github.com/repos/simonw/datasette/issues/648 | 625321121 | MDEyOklzc3VlQ29tbWVudDYyNTMyMTEyMQ== | 28694175 | 2020-05-07T15:21:19Z | 2020-05-07T15:21:19Z | NONE | It seems that heroku wasn't updating to 0.41 on deployment. Had to add `--branch 0.41` and that solved it! Heroku caches dependencies <img width="1331" alt="Screen Shot 2020-05-07 at 8 19 08 AM" src="https://user-images.githubusercontent.com/28694175/81312379-6f1f1680-903b-11ea-847c-4149268504a6.png"> and (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` These are the lines that gave me an idea on how to solve it: https://github.com/simonw/datasette/blob/182e5c8745c94576718315f7596ccc81e5e2417b/datasette/publish/heroku.py#L164-L186 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 534492501 |