-
Notifications
You must be signed in to change notification settings - Fork 699
Closed
Labels
Description
Original title (before I realized this is an invalid issue): On windows-latest: module 'sqlite3' has no attribute 'enable_load_extension'
Description:
On the windows-latest runner I am getting this error when I try to load a sqlite3 extension (such as SpatiaLite):
AttributeError: module 'sqlite3' has no attribute 'enable_load_extension'
Action version:
actions/setup-python@v5
Platform:
- Windows
Runner type:
- Hosted
Tools version:
3.10 and 3.12 (and likely others too)
Repro steps:
Here's my workflow: https://github.com/simonw/playing-with-actions-single/blob/ef31c4bbbad789123a0d15be776d123d697c09ec/.github/workflows/experiment.yml
Relevant section:
- name: Download mod_spatialite
run: Invoke-WebRequest -outfile spatialite.7z https://static.simonwillison.net/static/2024/spatialite-loadable-modules-5.0.0-win-amd64.7z
- name: Unpack the archive
run: 7z.exe x spatialite.7z
- name: Show path
run: echo $PWD\spatialite-loadable-modules-5.0.0-win-amd64
- name: Verify installation
run: |
python -c "import sqlite3; sqlite3.enable_load_extension(True); sqlite3.load_extension('$env:GITHUB_WORKSPACE\spatialite-loadable-modules-5.0.0-win-amd64\mod_spatialite')"Expected behavior:
SpatiaLite extension should load.
Actual behavior:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\hostedtoolcache\windows\Python\3.12.4\x64\Lib\sqlite3\__init__.py", line 70, in __getattr__
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
AttributeError: module 'sqlite3' has no attribute 'enable_load_extension'
Reactions are currently unavailable