geojson parsing fails on ubuntu precise #1346

Closed
springmeyer opened this Issue Jul 25, 2012 · 1 comment

Comments

Projects
None yet
1 participant
Owner

springmeyer commented Jul 25, 2012

See this with both clang++ and g++:

ubuntu@ip-10-179-98-132:~/mapnik$ clang++ -v
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ uname -a
Linux ip-10-179-98-132 3.2.0-25-virtual #40-Ubuntu SMP Wed May 23 22:20:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Test output is:

ubuntu@ip-10-179-98-132:~/mapnik$ make test
*** Running visual tests...
--------------------------------------------------------------------------------
Visual text rendering summary: All 56 tests passed: ✓ 
*** Running C++ tests...
C++ exceptions: ✓ 
C++ fonts registration: ✓ 
C++ parameters: ✓ 
*** Running python tests...
Notice: skipping postgis tests (connection)
..............................................T..............Error! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
FError! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
EError! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error! Expecting <unnamed-rule> here: "{
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
Error parsing GeoJSON "]" here: "{
            "type":"Feature",
            "geometry":
            {
                "type":"Point",
                "coordinates":
                [
                    -81.705583,
                    41.480573
                ]
            },
            "properties":
            {
                "name":"Test",
                "int":1,
                "description":"Test: \u005C",
                "spaces":"this has spaces",
                "double":1.1,
                "boolean":true,
                "NOM_FR":"Québec"
            }
        }
    ]
}"
F.....TT...................................................................................................................F..T...T...TT.......................................................................................................................................................................................................................T.....................
======================================================================
ERROR: python_tests.geojson_plugin_test.test_geojson_properties
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/mapnik/tests/python_tests/geojson_plugin_test.py", line 38, in test_geojson_properties
    f = s.all_features()[0]
  File "/usr/lib/python2.7/dist-packages/mapnik/__init__.py", line 263, in all_features
    return self.features(query).features
AttributeError: 'NoneType' object has no attribute 'features'

======================================================================
FAIL: python_tests.geojson_plugin_test.test_geojson_init
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/mapnik/tests/python_tests/geojson_plugin_test.py", line 19, in test_geojson_init
    assert_almost_equal(e.minx, -81.705583, places=7)
AssertionError: 0.0 != -81.705583 within 7 places

======================================================================
FAIL: python_tests.geojson_plugin_test.test_that_nonexistant_query_field_throws
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/mapnik/tests/python_tests/geojson_plugin_test.py", line 52, in test_that_nonexistant_query_field_throws
    eq_(len(ds.fields()),7)
  File "/usr/lib/python2.7/dist-packages/nose/tools.py", line 31, in eq_
    assert a == b, msg or "%r != %r" % (a, b)
AssertionError: 0 != 7

======================================================================
FAIL: python_tests.ogr_test.test_shapefile_properties
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/mapnik/tests/python_tests/ogr_test.py", line 40, in test_shapefile_properties
    eq_(f['NOM_FR'], u'Qu\xe9bec')
  File "/usr/lib/python2.7/dist-packages/nose/tools.py", line 31, in eq_
    assert a == b, msg or "%r != %r" % (a, b)
AssertionError: u'Qu\ufffdbec' != u'Qu\xe9bec'

----------------------------------------------------------------------
Ran 436 tests in 11.956s

FAILED (TODO=8, errors=1, failures=3)
make: *** [test] Error 1
Owner

springmeyer commented Nov 21, 2013

closing, many fixups have occured with geojson parsing in 2.3.x and master (3.x), the latest being #2083 so this is surely fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment