2

I want to execute a spatial join using GeoPandas in the Python console QGIS 3.8 like this:

dfsjoin = gpd.sjoin(point, polygon)

but it doesn't work. It always shows the following error:

Exception ignored in: <function Handle.__del__ at 0x0000026EC6680BF8>
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\rtree\index.py", line 895, in __del__
    self.destroy()
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\rtree\index.py", line 884, in destroy
    self._destroy(self._ptr)
OSError: exception: access violation writing 0x0000000000000001

But, if I run it in OSGeo4W Shell it runs correctly as following:

enter image description here

What is the different between python console in QGIS app and in OSGeo4W Shell? And how can I fix it?

  • the error is due to rtree and not GeoPandas (Geopandas use rtree) – gene Aug 30 at 14:31
  • But, It runs correctly when I try in OSGEO4W Shell – Suhendra Sep 1 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.