New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal Python error: Bus error - when loading the SpatiaLite extension #3
Comments
When I tried to run the whole
|
I ran with
It looks like it's def test_init_spatialite():
db = Database(memory=True)
spatialite = find_spatialite()
db.init_spatialite(spatialite)
assert "spatial_ref_sys" in db.table_names() Here's the most interesting part of what self.conn.enable_load_extension(True)
self.conn.load_extension(path)
# Initialize SpatiaLite if not yet initialized
if "spatial_ref_sys" in self.table_names():
return False
cursor = self.execute("select InitSpatialMetadata(1)")
result = cursor.fetchone()
return result and bool(result[0]) |
So it looks like the problem here may be that |
I opened this in the wrong repo, it should be in https://github.com/nalgeon/sqlean.py |
I tried loading import pysqlite3 as sqlite3
conn = sqlite3.connect(":memory:")
conn.enable_load_extension(True)
conn.load_extension("/opt/homebrew/lib/mod_spatialite.dylib")
conn.close() Result:
So I don't think the problem is with |
See this CPython issue python/cpython#101974:
I'll probably do the same. |
I got this while running the test suite for my new
sqlite-utils
branch forsqlean
:https://github.com/simonw/sqlite-utils/tree/sqlean
I installed
sqlean.py
into the same environment and ran this:Here's the test failure:
The text was updated successfully, but these errors were encountered: