Toblerity/rtree — pull request #34 by hobu (2014-11-01 02:29:45+00:00)
Title: Serializing to unicode filename causes exception

In Python 2.x attempting to serialize an rtree to a file using a unicode path causes an exception:

```
>>> import rtree
>>> index = rtree.index.Rtree(u'test')
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 314, in 'calling callback function'
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Rtree-0.8.0-py2.7.egg/rtree/index.py", line 671, in py_next_item
p_id[0], coordinates, obj = next(stream_iter)
ValueError: need more than 1 value to unpack
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Rtree-0.8.0-py2.7.egg/rtree/index.py", line 244, in __init__
self.handle = self._create_idx_from_stream(stream)
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Rtree-0.8.0-py2.7.egg/rtree/index.py", line 702, in _create_idx_from_stream
return core.rt.Index_CreateWithStream(self.properties.handle, stream)
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Rtree-0.8.0-py2.7.egg/rtree/core.py", line 24, in check_void
raise RTreeError(msg)
rtree.core.RTreeError: Error in "Index_CreateWithStream": IllegalArgumentException: RTree::BulkLoader::bulkLoadUsingSTR: Empty data stream given.
```