Coder Social home page Coder Social logo

Comments (6)

adrien-berchet avatar adrien-berchet commented on July 28, 2024

Hi @Danaozhong
Thanks for your report!
Could you please provide a complete example in one piece so we just have to copy/paste it to reproduce your issue please? Also, could you run your code with echo=True passed to create_engine and post the result here? It will be much easier to understand what's going on with this.
Thanks

from geoalchemy2.

Danaozhong avatar Danaozhong commented on July 28, 2024

Sure!
Here is a logfile created with echo=True.
complete_log.txt
A minimum example can be found here: https://github.com/Danaozhong/geoalchemy2-spatialite-example

from geoalchemy2.

adrien-berchet avatar adrien-berchet commented on July 28, 2024

I'm surprised by this line in your log:

updateTableTriggers: "no such module: rtree"

I think that, because of this, the spatial index is marked as enabled for your table but the creation of the tables actually containing the index values fails. So when you want to insert a new geometry, SpatiaLite tries to create a new index entry but fails since the required table does not exist.
Is it possible that your SpatiaLite was compiled without the R*Tree module?

from geoalchemy2.

adrien-berchet avatar adrien-berchet commented on July 28, 2024

@Danaozhong I tested your script and it works properly for me. So I really think this issue comes from your SpatiaLite library that is not properly installed or compiled. Did you try to perform the same operations manually using raw SQL (so without GeoAlchemy2)?

from geoalchemy2.

Danaozhong avatar Danaozhong commented on July 28, 2024

Thank you, it seems that the root cause is indeed the way the SpatiaLite library was compiled.

from geoalchemy2.

adrien-berchet avatar adrien-berchet commented on July 28, 2024

Ok, great!
I close this issue but don't hesitate to reopen it if you have any other question on this.

from geoalchemy2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.