-
Notifications
You must be signed in to change notification settings - Fork 124
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
Inconsistent unpickle errors when returning objects from intersection #103
Comments
@tomplex I'm unsure what's up with pickling here. For what it's worth, I haven't used this in my own applications. Instead I've maintained a mapping of strings (like Can you provide a little more information?
I haven't seen any reports of problems with multiple indexes, but I can't rule it out. |
Hey @sgillies, thanks for the response. I started out using To answer your specific questions:
The app is using threading to get & load data into separate from rtree import index
from threading import Thread
class Dataset:
def load(self, data):
self._rtree = index.Index(data)
def load_async(self, data):
self._thread = Thread(target=self.load, args=(data,))
self._thread.start()
d1 = Dataset()
d2 = Dataset()
d1.load_async(data1)
d2.load_async(data2)
# wait 'till it's done loading
results = d2.intersection('Polygon(...)') I saw that the |
Hello,
I'm using
rtree
in an application I'm writing and running into some odd issues with the objects that I'm passing in to the index when creating it. Unfortunately I can't consistently replicate the issue (even with the same dataset), but I will provide an example of what I'm seeing in the hopes that someone has seen it before / can help me debug.I'm bulk-loading two indexes, each from a different generator of data, passing in the ID of each row as the
object
in the index, an alphanumeric primary key. It's in all cases a valid ascii string, with no fancy characters; just letters and numbers. The example below is contrived and not necessarily representative of the data I'm working with, which I unfortunately cannot share, but is a small scale example of what I'm doing.Now, when I perform intersections against the index, I've been using the
objects='raw'
argument, as I wish to get back from the index the IDs of the matching records:When doing this, I will inconsistently receive a number of similar but not identical errors:
I am not overriding the
loads
ordumps
methods of theRtree
(though I have tried that to resolve this issue). The inability to consistently get this error condition when running the same application with the same data has been frustrating. Could this issue be a result of my using multipleIndex
objects at once?Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: