{"html_url": "https://github.com/simonw/datasette/issues/1706#issuecomment-1344669160", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1706", "id": 1344669160, "node_id": "IC_kwDOBm6k_c5QJgXo", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-12-09T19:11:40Z", "updated_at": "2022-12-09T19:11:40Z", "author_association": "NONE", "body": "Ah, yes! Was just trying to do this and had the same issue. +1 to this!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1198822563, "label": "[feature] immutable mode for a directory, not just individual sqlite file"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319664697", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319664697, "node_id": "IC_kwDOBm6k_c5OqHw5", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-11-18T07:59:36Z", "updated_at": "2022-11-18T08:00:38Z", "author_association": "NONE", "body": "Okay, my final observations for the night! I've been pushing and pulling the various levers in `utils/__init__.py` to see what makes this work without hard-coding in something for `arm64` and it seems that if I change `/usr/lib/x86_64-linux-gnu/mod_spatialite.so` [here](https://github.com/simonw/datasette/blob/3ecd131e57add427d847b614c920c9624bb2e66b/datasette/utils/__init__.py#L407) to just `mod_spatialite` it's happy.\r\n\r\nUnfortunately cannot audit that for `x86_64`, but maybe that's a solution that'd be cross-arch compatible? It seems like it's the hard-coding of that path that's tripping it up.\r\n\r\n(It was actually [this comment from back in 2018 in an entirely unrelated repo](https://github.com/pelias/docker/pull/28#issuecomment-433168462) that nudged me to try this, ha.)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319641636", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319641636, "node_id": "IC_kwDOBm6k_c5OqCIk", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-11-18T07:27:26Z", "updated_at": "2022-11-18T07:27:26Z", "author_association": "NONE", "body": "Can confirm that my `uname -a` returns something different at the end:\r\n\r\n```\r\nroot:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64\r\n```\r\n\r\nI'm in `arm64` land, you're in `x86_64`. I am admittedly very fuzzy on how this factors into Docker these days. Honestly thought this was one of the things Docker was suppose to help address. \ud83e\udd14", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319639462", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319639462, "node_id": "IC_kwDOBm6k_c5OqBmm", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-11-18T07:24:19Z", "updated_at": "2022-11-18T07:24:19Z", "author_association": "NONE", "body": "Is it, uh, possible we are on different architectures? \ud83d\ude05 I'm using an Apple M1 Pro.\r\n\r\nI jumped into a bash shell of an unmodified `python:3.11.0-slim-bullseye` container and manually ran `apt-get update` and installed `libsqlite3-mod-spatialite`. I don't end up with with `mod_spatialite.so` in `/usr/lib/x86_64-linux-gnu/` \u2014 _mine_ is in `/usr/lib/aarch64-linux-gnu/`.\r\n\r\n[I swapped that directory in here](https://github.com/simonw/datasette/blob/3db37e9a21f774d6c387fd04bf1e4c870554209e/datasette/utils/__init__.py#L407) in a local copy of `datasette` and poof \u2014 it worked!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319596087", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319596087, "node_id": "IC_kwDOBm6k_c5Op3A3", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-11-18T06:16:33Z", "updated_at": "2022-11-18T06:16:33Z", "author_association": "NONE", "body": "Interesting! So I tried this locally using your copy of `nps-spatialite.db` and I got the same error. \ud83e\udd14\r\n\r\n```\r\n\u276f datasette package nps-spatialite.db --spatialite\r\n[+] Building 27.5s (10/10) FINISHED \r\n => [internal] load build definition from Dockerfile 0.0s\r\n => => transferring dockerfile: 622B 0.0s\r\n => [internal] load .dockerignore 0.0s\r\n => => transferring context: 2B 0.0s\r\n => [internal] load metadata for docker.io/library/python:3.11.0-slim-bullseye 0.9s\r\n => [internal] load build context 2.3s\r\n => => transferring context: 72.38MB 2.3s\r\n => CACHED [1/6] FROM docker.io/library/python:3.11.0-slim-bullseye@sha256:1cd45c5dad845af18d71745c017325725dc979571c1bbe625b67e6051533716c 0.0s\r\n => [2/6] COPY . /app 0.1s\r\n => [3/6] WORKDIR /app 0.0s\r\n => [4/6] RUN apt-get update && apt-get install -y python3-dev gcc libsqlite3-mod-spatialite && rm -rf /var/lib/apt/lists/* 18.5s\r\n => [5/6] RUN pip install -U datasette 4.9s\r\n => ERROR [6/6] RUN datasette inspect nps-spatialite.db --inspect-file inspect-data.json 0.7s \r\n------ \r\n > [6/6] RUN datasette inspect nps-spatialite.db --inspect-file inspect-data.json: \r\n#10 0.681 Traceback (most recent call last): \r\n#10 0.681 File \"/usr/local/bin/datasette\", line 8, in \r\n#10 0.681 sys.exit(cli()) \r\n#10 0.681 ^^^^^\r\n#10 0.681 File \"/usr/local/lib/python3.11/site-packages/click/core.py\", line 1130, in __call__\r\n#10 0.682 return self.main(*args, **kwargs)\r\n#10 0.682 ^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.682 File \"/usr/local/lib/python3.11/site-packages/click/core.py\", line 1055, in main\r\n#10 0.682 rv = self.invoke(ctx)\r\n#10 0.682 ^^^^^^^^^^^^^^^^\r\n#10 0.682 File \"/usr/local/lib/python3.11/site-packages/click/core.py\", line 1657, in invoke\r\n#10 0.682 return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n#10 0.682 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.682 File \"/usr/local/lib/python3.11/site-packages/click/core.py\", line 1404, in invoke\r\n#10 0.682 return ctx.invoke(self.callback, **ctx.params)\r\n#10 0.682 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.682 File \"/usr/local/lib/python3.11/site-packages/click/core.py\", line 760, in invoke\r\n#10 0.682 return __callback(*args, **kwargs)\r\n#10 0.682 ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/cli.py\", line 164, in inspect\r\n#10 0.683 inspect_data = loop.run_until_complete(inspect_(files, sqlite_extensions))\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/asyncio/base_events.py\", line 650, in run_until_complete\r\n#10 0.683 return future.result()\r\n#10 0.683 ^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/cli.py\", line 179, in inspect_\r\n#10 0.683 counts = await database.table_counts(limit=3600 * 1000)\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/database.py\", line 304, in table_counts\r\n#10 0.683 for table in await self.table_names():\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/database.py\", line 342, in table_names\r\n#10 0.683 results = await self.execute(\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/database.py\", line 267, in execute\r\n#10 0.683 results = await self.execute_fn(sql_operation_in_thread)\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/database.py\", line 213, in execute_fn\r\n#10 0.683 return await asyncio.get_event_loop().run_in_executor(\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/concurrent/futures/thread.py\", line 58, in run\r\n#10 0.683 result = self.fn(*self.args, **self.kwargs)\r\n#10 0.683 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/database.py\", line 209, in in_thread\r\n#10 0.683 self.ds._prepare_connection(conn, self.name)\r\n#10 0.683 File \"/usr/local/lib/python3.11/site-packages/datasette/app.py\", line 593, in _prepare_connection\r\n#10 0.683 conn.execute(\"SELECT load_extension(?)\", [extension])\r\n#10 0.683 sqlite3.OperationalError: /usr/lib/x86_64-linux-gnu/mod_spatialite.so.so: cannot open shared object file: No such file or directory\r\n------\r\nexecutor failed running [/bin/sh -c datasette inspect nps-spatialite.db --inspect-file inspect-data.json]: exit code: 1\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null}