Created
August 26, 2015 16:30
-
-
Save rmarianski/99a2d6e16b6cad4f9313 to your computer and use it in GitHub Desktop.
mapbox-vector-tile python3 test failures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ virtualenv --python=python3 env3 | |
Running virtualenv with interpreter /usr/bin/python3 | |
Using base prefix '/usr' | |
New python executable in env3/bin/python3 | |
Also creating executable in env3/bin/python | |
Installing setuptools, pip...done. | |
$ source env3/bin/activate | |
$ python -V | |
Python 3.4.0 | |
$ python setup.py develop | |
running develop | |
running egg_info | |
writing top-level names to mapbox_vector_tile.egg-info/top_level.txt | |
writing dependency_links to mapbox_vector_tile.egg-info/dependency_links.txt | |
writing requirements to mapbox_vector_tile.egg-info/requires.txt | |
writing mapbox_vector_tile.egg-info/PKG-INFO | |
reading manifest file 'mapbox_vector_tile.egg-info/SOURCES.txt' | |
writing manifest file 'mapbox_vector_tile.egg-info/SOURCES.txt' | |
running build_ext | |
Creating /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/mapbox-vector-tile.egg-link (link to .) | |
Adding mapbox-vector-tile 0.0.12.dev0 to easy-install.pth file | |
Installed /home/rob/dev/python/mapbox-vector-tile | |
Processing dependencies for mapbox-vector-tile==0.0.12.dev0 | |
Searching for shapely | |
Reading https://pypi.python.org/simple/shapely/ | |
Best match: Shapely 1.5.11 | |
Downloading https://pypi.python.org/packages/source/S/Shapely/Shapely-1.5.11.tar.gz#md5=37530a4f9418917c9afd38fcd15bc891 | |
Processing Shapely-1.5.11.tar.gz | |
Writing /tmp/easy_install-izv7u0s3/Shapely-1.5.11/setup.cfg | |
Running Shapely-1.5.11/setup.py -q bdist_egg --dist-dir /tmp/easy_install-izv7u0s3/Shapely-1.5.11/egg-dist-tmp-ambeqw7l | |
shapely/speedups/_speedups.c:4:20: fatal error: Python.h: No such file or directory | |
#include "Python.h" | |
^ | |
compilation terminated. | |
WARNING:/tmp/easy_install-izv7u0s3/Shapely-1.5.11/setup.py:command 'x86_64-linux-gnu-gcc' failed with exit status 1 | |
WARNING:/tmp/easy_install-izv7u0s3/Shapely-1.5.11/setup.py:The C extension could not be compiled, speedups are not enabled. | |
WARNING:/tmp/easy_install-izv7u0s3/Shapely-1.5.11/setup.py:Failure information, if any, is above. | |
WARNING:/tmp/easy_install-izv7u0s3/Shapely-1.5.11/setup.py:I'm retrying the build without the C extension now. | |
zip_safe flag not set; analyzing archive contents... | |
shapely.__pycache__.libgeos.cpython-34: module references __file__ | |
WARNING:/tmp/easy_install-izv7u0s3/Shapely-1.5.11/setup.py:The C extension could not be compiled, speedups are not enabled. | |
Adding Shapely 1.5.11 to easy-install.pth file | |
Installed /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/Shapely-1.5.11-py3.4.egg | |
Searching for protobuf | |
Reading https://pypi.python.org/simple/protobuf/ | |
Best match: protobuf 3.0.0-alpha-1 | |
Downloading https://pypi.python.org/packages/3.4/p/protobuf/protobuf-3.0.0_alpha_1-py3.4.egg#md5=ab09351ab0513e4376b9c26b5507d6d3 | |
Processing protobuf-3.0.0_alpha_1-py3.4.egg | |
Moving protobuf-3.0.0_alpha_1-py3.4.egg to /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages | |
Adding protobuf 3.0.0-alpha-1 to easy-install.pth file | |
Installed /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/protobuf-3.0.0_alpha_1-py3.4.egg | |
Searching for setuptools==2.2 | |
Best match: setuptools 2.2 | |
Adding setuptools 2.2 to easy-install.pth file | |
Installing easy_install-3.4 script to /home/rob/dev/python/mapbox-vector-tile/env3/bin | |
Installing easy_install script to /home/rob/dev/python/mapbox-vector-tile/env3/bin | |
Using /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages | |
Finished processing dependencies for mapbox-vector-tile==0.0.12.dev0 | |
$ pip install protobuf==3.0.0a3 | |
Downloading/unpacking protobuf==3.0.0a3 | |
Downloading protobuf-3.0.0a3.tar.gz (88kB): 88kB downloaded | |
Running setup.py (path:/home/rob/dev/python/mapbox-vector-tile/env3/build/protobuf/setup.py) egg_info for package protobuf | |
no previously-included directories found matching 'google/protobuf/internal/import_test_package' | |
warning: no previously-included files found matching 'google/protobuf/internal/*_pb2.py' | |
warning: no previously-included files found matching 'google/protobuf/internal/*_test.py' | |
warning: no previously-included files found matching 'google/protobuf/internal/*.proto' | |
warning: no previously-included files found matching 'google/protobuf/internal/test_util.py' | |
warning: no previously-included files matching '*_test.py' found under directory 'google' | |
warning: no previously-included files matching '*_test.proto' found under directory 'google' | |
warning: no previously-included files matching 'unittest*_pb2.py' found under directory 'google' | |
warning: no previously-included files matching '*.dll' found anywhere in distribution | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no previously-included files matching '*.pyo' found anywhere in distribution | |
warning: no previously-included files matching '*.so' found anywhere in distribution | |
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./env3/lib/python3.4/site-packages (from protobuf==3.0.0a3) | |
Installing collected packages: protobuf | |
Found existing installation: protobuf 3.0.0-alpha-1 | |
Uninstalling protobuf: | |
Successfully uninstalled protobuf | |
Running setup.py install for protobuf | |
Skipping implicit fixer: buffer | |
Skipping implicit fixer: idioms | |
Skipping implicit fixer: set_literal | |
Skipping implicit fixer: ws_comma | |
Skipping installation of /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/google/__init__.py (namespace package) | |
no previously-included directories found matching 'google/protobuf/internal/import_test_package' | |
warning: no previously-included files found matching 'google/protobuf/internal/*_pb2.py' | |
warning: no previously-included files found matching 'google/protobuf/internal/*_test.py' | |
warning: no previously-included files found matching 'google/protobuf/internal/*.proto' | |
warning: no previously-included files found matching 'google/protobuf/internal/test_util.py' | |
warning: no previously-included files matching '*_test.py' found under directory 'google' | |
warning: no previously-included files matching '*_test.proto' found under directory 'google' | |
warning: no previously-included files matching 'unittest*_pb2.py' found under directory 'google' | |
warning: no previously-included files matching '*.dll' found anywhere in distribution | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no previously-included files matching '*.pyo' found anywhere in distribution | |
warning: no previously-included files matching '*.so' found anywhere in distribution | |
Installing /home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/protobuf-3.0.0a3-py3.4-nspkg.pth | |
Successfully installed protobuf | |
Cleaning up... | |
$ python setup.py test | |
running test | |
running egg_info | |
writing dependency_links to mapbox_vector_tile.egg-info/dependency_links.txt | |
writing requirements to mapbox_vector_tile.egg-info/requires.txt | |
writing mapbox_vector_tile.egg-info/PKG-INFO | |
writing top-level names to mapbox_vector_tile.egg-info/top_level.txt | |
reading manifest file 'mapbox_vector_tile.egg-info/SOURCES.txt' | |
writing manifest file 'mapbox_vector_tile.egg-info/SOURCES.txt' | |
running build_ext | |
running test | |
running egg_info | |
writing dependency_links to mapbox_vector_tile.egg-info/dependency_links.txt | |
writing requirements to mapbox_vector_tile.egg-info/requires.txt | |
writing mapbox_vector_tile.egg-info/PKG-INFO | |
writing top-level names to mapbox_vector_tile.egg-info/top_level.txt | |
reading manifest file 'mapbox_vector_tile.egg-info/SOURCES.txt' | |
writing manifest file 'mapbox_vector_tile.egg-info/SOURCES.txt' | |
running build_ext | |
test_decoder (test_decoder.BaseTestCase) ... ERROR | |
test_encoder (test_encoder.BaseTestCase) ... FAIL | |
test_encode_feature_with_id (test_encoder.TestDifferentGeomFormats) ... FAIL | |
test_encode_float_little_endian (test_encoder.TestDifferentGeomFormats) ... FAIL | |
test_encode_multipolygon (test_encoder.TestDifferentGeomFormats) ... FAIL | |
test_encode_unicode_property (test_encoder.TestDifferentGeomFormats) ... ERROR | |
test_encode_unicode_property_key (test_encoder.TestDifferentGeomFormats) ... FAIL | |
test_with_invalid_geometry (test_encoder.TestDifferentGeomFormats) ... ERROR:shapely.geos:ParseException: Unknown type: 'XYZ' | |
ERROR | |
test_with_shapely (test_encoder.TestDifferentGeomFormats) ... FAIL | |
test_with_wkb (test_encoder.TestDifferentGeomFormats) ... ERROR | |
test_with_wkt (test_encoder.TestDifferentGeomFormats) ... FAIL | |
====================================================================== | |
ERROR: test_decoder (test_decoder.BaseTestCase) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/google/protobuf/internal/python_message.py", line 1008, in MergeFromString | |
if self._InternalParse(serialized, 0, length) != length: | |
File "/home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/google/protobuf/internal/python_message.py", line 1030, in InternalParse | |
(tag_bytes, new_pos) = local_ReadTag(buffer, pos) | |
File "/home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/google/protobuf/internal/decoder.py", line 189, in ReadTag | |
while (ord(buffer[pos]) if py2 else buffer[pos]) & 0x80: | |
TypeError: unsupported operand type(s) for &: 'str' and 'int' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_decoder.py", line 14, in test_decoder | |
self.assertEqual(mapbox_vector_tile.decode(vector_tile), | |
File "/home/rob/dev/python/mapbox-vector-tile/mapbox_vector_tile/__init__.py", line 10, in decode | |
message = vector_tile.getMessage(tile) | |
File "/home/rob/dev/python/mapbox-vector-tile/mapbox_vector_tile/decoder.py", line 30, in getMessage | |
self.tile.ParseFromString(pbf_data) | |
File "/home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/google/protobuf/message.py", line 185, in ParseFromString | |
self.MergeFromString(serialized) | |
File "/home/rob/dev/python/mapbox-vector-tile/env3/lib/python3.4/site-packages/google/protobuf/internal/python_message.py", line 1014, in MergeFromString | |
raise message_mod.DecodeError('Truncated message.') | |
google.protobuf.message.DecodeError: Truncated message. | |
====================================================================== | |
ERROR: test_encode_unicode_property (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 92, in test_encode_unicode_property | |
self.feature_properties["foo"] = unicode(self.feature_properties["foo"]) | |
NameError: name 'unicode' is not defined | |
====================================================================== | |
ERROR: test_with_invalid_geometry (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 88, in test_with_invalid_geometry | |
self.assertEqual(ex.exception[0], expected_result) | |
TypeError: 'NotImplementedError' object is not subscriptable | |
====================================================================== | |
ERROR: test_with_wkb (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 59, in test_with_wkb | |
"properties": self.feature_properties | |
File "/home/rob/dev/python/mapbox-vector-tile/mapbox_vector_tile/__init__.py", line 18, in encode | |
vector_tile.addFeatures(layer['features'], layer['name']) | |
File "/home/rob/dev/python/mapbox-vector-tile/mapbox_vector_tile/encoder.py", line 53, in addFeatures | |
'Can\'t do geometries that are not wkt, wkb, or shapely ' | |
NotImplementedError: Can't do geometries that are not wkt, wkb, or shapely geometries | |
====================================================================== | |
FAIL: test_encoder (test_encoder.BaseTestCase) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 29, in test_encoder | |
}]), expected_result) | |
AssertionError: b'\x1aG\n\x05water\x12\x18\x12\x06\x00\x0[148 chars]\x02' != '\x1aG\n\x05water\x12\x18\x12\x06\x00\x00[147 chars]\x02' | |
====================================================================== | |
FAIL: test_encode_feature_with_id (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 133, in test_encode_feature_with_id | |
self.assertEqual(expected_result, result) | |
AssertionError: '\x1a\x18\n\x05water\x12\n\x08*\x18\x01"\x04\t\x02þ?(\x80 x\x02' != b'\x1a\x18\n\x05water\x12\n\x08*\x18\x01"\x04\t\x02\xfe?(\x80 x\x02' | |
====================================================================== | |
FAIL: test_encode_float_little_endian (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 125, in test_encode_float_little_endian | |
}]), expected_result) | |
AssertionError: b'\x1a\\\n\x05water\x12\x18\x12\x08\x00\x[191 chars]\x02' != '\x1a\\\n\x05water\x12\x18\x12\x08\x00\x0[181 chars]\x02' | |
====================================================================== | |
FAIL: test_encode_multipolygon (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 146, in test_encode_multipolygon | |
self.assertEqual(expected_result, result) | |
AssertionError: '\x1a9\n\x05water\x12\x0e\x18\x03"\n\tP°?[109 chars]\x02' != b'\x1a9\n\x05water\x12\x0e\x18\x03"\n\tP\[116 chars]\x02' | |
====================================================================== | |
FAIL: test_encode_unicode_property_key (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 113, in test_encode_unicode_property_key | |
}]), expected_result) | |
AssertionError: b'\x1aS\n\x05water\x12\x18\x12\x08\x00\x0[189 chars]\x02' != '\x1aS\n\x05water\x12\x18\x12\x08\x00\x00[173 chars]\x02' | |
====================================================================== | |
FAIL: test_with_shapely (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 74, in test_with_shapely | |
}]), expected_result) | |
AssertionError: b'\x1aE\n\x05water\x12\x16\x12\x06\x00\x0[138 chars]\x02' != '\x1aE\n\x05water\x12\x16\x12\x06\x00\x00[134 chars]\x02' | |
====================================================================== | |
FAIL: test_with_wkt (test_encoder.TestDifferentGeomFormats) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/rob/dev/python/mapbox-vector-tile/tests/test_encoder.py", line 50, in test_with_wkt | |
}]), expected_result) | |
AssertionError: b'\x1aE\n\x05water\x12\x16\x12\x06\x00\x0[138 chars]\x02' != '\x1aE\n\x05water\x12\x16\x12\x06\x00\x00[134 chars]\x02' | |
---------------------------------------------------------------------- | |
Ran 11 tests in 0.008s | |
FAILED (failures=7, errors=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment