-
Notifications
You must be signed in to change notification settings - Fork 123
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
ArgumentError: expected LP_LP_c_long instance instead of pointer to LP_c_long #238
Comments
Can you please provide a scenario that demonstrates this issue? |
@hobu Thanks for the reply, the scenario is the following. First of all, here is the list of the versions that I am using:
I am running it on a Bitnami instance on a Debian GNU/Linux 10 (buster) VPS. When I run it locally, on macOS, this error never appears. I have a view in Django that calls this code:
Here there is the last part of the Traceback:
Currently, instead of using |
Thanks for the example, but you will have to pull geopandas out of it. I would think if the intersection method for Rtree was always passing in the wrong thing, we would have a lot of bugs in the repository. The code that calls that intersection method hasn't changed for 10+ years either. Maybe @martinfleis or @jorisvandenbossche could work this issue with this scenario and example data that demonstrates it. |
@nicolozambon can you try to provide a fully reproducible example? For example, does running the following using the naturalearth example dataset fail as well for you?
|
@jorisvandenbossche thank you for your interest. I tried the code you suggested and I confirm that, with the environment described above, the problem arises. The strangest thing is that the error does not always show up. I tried calling the web page about ten times: the first two returned the correct output while the rest showed the error. If you want to try simulating my environment you could set up Django on an AWS Lightsail instance. |
Can you reproduce this without Django and/or outside of the AWS instance? Or only with this specific situation? |
@jorisvandenbossche outside Django it seems working. I tried to run the commands directly from the python shell on AWS and it works. |
Closing this issue here as it doesn't seem to be an Rtree thing. |
I am using rtree as a dependency of GeoPandas Python module. Running Django on Apache VPS, I often get this error:
In
rtree/index.py
starting at line 688 there is:I undertand that the problem is related to the argument
ctypes.byref(it)
.The text was updated successfully, but these errors were encountered: