Comments (21)
Can we wait til tkmorrow? I want to go through my local tree and I can't get to this until tonight.
On Jul 12, 2014, at 10:01 AM, Sean Gillies [email protected] wrote:
Now that #18 is closed, Rtree works on Python 3.4 and this warrants a new release. Will tag and upload to PyPI after a little more testing with GeoPandas.
cc @hobu
—
Reply to this email directly or view it on GitHub.
from rtree.
Waiting is good. I just found another 2/3 quirk, next
is problematic, fixed in 8ead5fd. I might find a couple more issues like this today.
from rtree.
Getting some error messages with homebrew's libspatialindex at this time.
======================================================================
FAIL: /Users/hobu/dev/git/rtree/tests/index.txt
Doctest: index.txt
----------------------------------------------------------------------
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for index.txt
File "/Users/hobu/dev/git/rtree/tests/index.txt", line 0
----------------------------------------------------------------------
File "/Users/hobu/dev/git/rtree/tests/index.txt", line 37, in index.txt
Failed example:
idx.insert(4321, (34.3776829412, 26.7375853734, 49.3776829412, 41.7375853734), obj=42)
Exception raised:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1289, in __run
compileflags, 1) in test.globs
File "<doctest index.txt[11]>", line 1, in <module>
idx.insert(4321, (34.3776829412, 26.7375853734, 49.3776829412, 41.7375853734), obj=42)
File "/Users/hobu/dev/git/rtree/rtree/index.py", line 350, in insert
size, data, pyserialized = self._serialize(obj)
File "/Users/hobu/dev/git/rtree/rtree/index.py", line 309, in _serialize
serialized = self.dumps(obj)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1374, in dumps
Pickler(file, protocol).dump(obj)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 202, in __init__
raise ValueError("pickle protocol must be <= %d" % HIGHEST_PROTOCOL)
ValueError: pickle protocol must be <= 2
======================================================================
FAIL: /Users/hobu/dev/git/rtree/tests/test_customStorage.txt
Doctest: test_customStorage.txt
----------------------------------------------------------------------
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test_customStorage.txt
File "/Users/hobu/dev/git/rtree/tests/test_customStorage.txt", line 0
----------------------------------------------------------------------
File "/Users/hobu/dev/git/rtree/tests/test_customStorage.txt", line 155, in test_customStorage.txt
Failed example:
r2.count( (0,0,10,10) )
Expected:
1
Got:
1L
----------------------------------------------------------------------
from rtree.
I'll fix these during the game :)
from rtree.
@hobu, I see something different on Travis: https://travis-ci.org/Toblerity/rtree/builds/29842558.
Is the custom storage stuff in use? I'm wondering if it's allowing people to succeed poorly territory...
I've got 1.8.1 on my laptop, homebrew, and no errors at all. Travis has Ubuntu precise, so only 1.7. Hrm.
from rtree.
I'm inclined to release 0.8 despite that custom storage tests are failing with libspatialindex 1.7. FWIW, the index.txt passes with 1.7 on Travis and 1.8.1 on my Mac.
from rtree.
We should maybe just disable custom storage for all libspatialindex less than 1.8
On Jul 13, 2014, at 3:55 PM, Sean Gillies [email protected] wrote:
From #12 it looks like I've got a version < 1.8 on Travis although Ubuntu GIS appears to offer 1.8.1.
—
Reply to this email directly or view it on GitHub.
from rtree.
I'm seeing the pickle protocol error on Ubuntu 14.04 with stock libspatialite-dev (1.8.1?) via the spatial_index
branch in geopandas. Python 2.7.6 64 bit.
/home/mperry/src/geopandas/examples/_ctypes/callbacks.c in 'calling callback function'()
/home/mperry/env/geopandas/src/rtree/rtree/index.pyc in py_next_item(p_id, p_mins, p_maxs, p_dimension, p_data, p_length)
686 p_length[0] = 0
687 else:
--> 688 p_length[0], data, _ = self._serialize(obj)
689 p_data[0] = ctypes.cast(data, ctypes.POINTER(ctypes.c_ubyte))
690
/home/mperry/env/geopandas/src/rtree/rtree/index.pyc in _serialize(self, obj)
307
308 def _serialize(self, obj):
--> 309 serialized = self.dumps(obj)
310 size = len(serialized)
311
/usr/lib/python2.7/pickle.pyc in dumps(obj, protocol)
1372 def dumps(obj, protocol=None):
1373 file = StringIO()
-> 1374 Pickler(file, protocol).dump(obj)
1375 return file.getvalue()
1376
/usr/lib/python2.7/pickle.pyc in __init__(self, file, protocol)
200 protocol = HIGHEST_PROTOCOL
201 elif not 0 <= protocol <= HIGHEST_PROTOCOL:
--> 202 raise ValueError("pickle protocol must be <= %d" % HIGHEST_PROTOCOL)
203 self.write = file.write
204 self.memo = {}
ValueError: pickle protocol must be <= 2
from rtree.
Think it could be the switch from cPickle to pickle? ba43b44
from rtree.
@sgillies Yes, this block doesn't make any sense:
try:
import pickle as pickle
except ImportError:
import pickle
the first import should still be cPickle as pickle
. I'll bet it was an automatic 2to3
change. The try
/except
should still work on Python 3.
from rtree.
All tests passing for me with libspatialindex 1.8.1 via homebrew for master.
from rtree.
Yeah, that looks right, hobu. On Python 3, cPickle is _pickle and is imported transparently when available.
from rtree.
Confirmations of the fix are appearing in geopandas/geopandas#141 :)
from rtree.
Toblerity/Rtree tests still failing due to old libspatialindex, I think
https://travis-ci.org/Toblerity/rtree/jobs/30203316
from rtree.
Yep, got a fix for that in ce888d1.
from rtree.
Added detection to the library in case someone actually uses it in libspatialindex < 1.8 in @66393b1188a2be600dbadbf87e8e3e86a32fa43d
from rtree.
Still bombing. https://travis-ci.org/Toblerity/rtree/jobs/30206051 For some reason @ce888d1de1ea0e50427e53eedfc0a6e65426f2a1 isn't causing custom storage tests to be turned off, but the error message is returned to the user now at least.
from rtree.
Another swing, working locally, at @b453da6634b3d654889600982acb278c789718ba
from rtree.
I followed up in 1f969aa. This is gonna work :)
from rtree.
Confirmed that 1.8+ is still gonna work with customStorage after @1f969aa
from rtree.
Travis is happy. I'll tag and upload to PyPI.
from rtree.
Related Issues (20)
- Python 3.10 wheels HOT 2
- rtree fails to import HOT 1
- ArgumentError: expected LP_LP_c_long instance instead of pointer to LP_c_long HOT 8
- typing_extensions now required HOT 1
- Using rtree in Cygwin HOT 1
- import rtree leads to `OSError: Could not load libspatialindex_c library` on aarch64 HOT 6
- Please release a new version with the type hints support HOT 1
- Index is checking write access despite assuming read-only access HOT 3
- why .dat file modified after intersection query?
- Nearest Neighbour Metric
- how to output more information about the constructed Rtree HOT 1
- QUESTION: How can rtree.index.Index properties be used to tweak performance ? HOT 2
- Linux binary wheels have two copies of libspatialindex HOT 1
- Calculating the Height of an R-Tree: Where Did I Go Wrong? HOT 1
- Issue with Python 3.12.0rc1 HOT 5
- "Unable to open file '%s' for index storage" - Write permissions on index should not be required HOT 1
- About RTree Data Structure Persistent Storage HOT 3
- Release publishing automation HOT 1
- Allow string ids in indexes (or at least improve the error messages) HOT 2
- Determinism
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtree.