Opened 8 years ago

Closed 8 years ago

#1701 closed defect (fixed)

Tilelite 500 internal error

Reported by: kalxas Owned by: live-demo@…
Priority: critical Milestone: OSGeoLive10.0
Component: OSGeoLive Keywords: mapnik, tilelite
Cc: live-demo@…

Description

Mapnik has been upgraded to 3.0.9 for Xenial. Tilelite version we ship seems to have problem with the new version of python-mapnik:

127.0.0.1 - - [03/Jun/2016 16:44:08] "GET /1/0/0.png HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 170, in execute
    for data in application_iter:
  File "/usr/local/lib/python2.7/dist-packages/tilelite.py", line 360, in __call__
    envelope = self._merc.xyz_to_envelope(x,y,zoom)
  File "/usr/local/lib/python2.7/dist-packages/tilelite.py", line 147, in xyz_to_envelope
    lonlat_bbox = mapnik.Envelope(minx,miny,maxx,maxy)
  File "/usr/lib/python2.7/dist-packages/mapnik/__init__.py", line 110, in __init__
    Box2d.__init__(self, *args, **kwargs)
TypeError: unbound method Boost.Python.function object must be called with Box2d instance as first argument (got Envelope instance instead)
127.0.0.1 - - [03/Jun/2016 16:44:25] "GET /1/0/0.png HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 170, in execute
    for data in application_iter:
  File "/usr/local/lib/python2.7/dist-packages/tilelite.py", line 360, in __call__
    envelope = self._merc.xyz_to_envelope(x,y,zoom)
  File "/usr/local/lib/python2.7/dist-packages/tilelite.py", line 147, in xyz_to_envelope
    lonlat_bbox = mapnik.Envelope(minx,miny,maxx,maxy)
  File "/usr/lib/python2.7/dist-packages/mapnik/__init__.py", line 110, in __init__
    Box2d.__init__(self, *args, **kwargs)
TypeError: unbound method Boost.Python.function object must be called with Box2d instance as first argument (got Envelope instance instead)

Change History (8)

comment:1 by Bas Couwenberg, 8 years ago

I'm afraid that tilelite hasn't seen any upstream activity since 2013, we should probably remove it from the distributions. Update: tilelite has been removed from Debian.

TileStache & TileCache have also not seen any upstream activity in a while, you may be able to get those to work with Mapnik 3. TileCache is an OSGeo project.

The current tileserver documentation on the Debian Wiki recommends using the unpackaged mod_tile. I've started packaging it, but haven't touched that for a while because there are somes issues with the iniparser dependency (1, 2). For OSGeo-Live that's not such a big issue.

Last edited 8 years ago by Bas Couwenberg (previous) (diff)

comment:2 by kalxas, 8 years ago

Tilelite has been dropped from OSGeoLive too.

Thanks for the input Bas, I will try to build the mentioned packages for Xenial and report back.

comment:4 by kalxas, 8 years ago

Fixed in build 176.

comment:5 by kalxas, 8 years ago

Priority: blockercritical

Latest python-mapnik throws this warning when TileStache and MApProxy are launched:

/usr/lib/python2.7/dist-packages/mapnik/__init__.py:74: RuntimeWarning: to-Python converter for std::shared_ptr<mapnik::geometry::geometry<double> > already registered; second conversion method ignored.
  from ._mapnik import *

comment:6 by kalxas, 8 years ago

Also, when trying to access the standard TileStache previewer (http://localhost:8012/example/preview.html), this error is reported in Firefox console:

ReferenceError: MM is not defined
 preview.html:27:13
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

in reply to:  5 comment:7 by Bas Couwenberg, 8 years ago

Replying to kalxas:

Latest python-mapnik throws this warning when TileStache and MApProxy are launched:

/usr/lib/python2.7/dist-packages/mapnik/__init__.py:74: RuntimeWarning: to-Python converter for std::shared_ptr<mapnik::geometry::geometry<double> > already registered; second conversion method ignored.
  from ._mapnik import *

The RuntimeWarnings should be fixed upstream (commit 6256787).

The most recent upstream changes including the above are included in python-mapnik (1:0.0~20160531-f65767a-1).

comment:8 by kalxas, 8 years ago

Resolution: fixed
Status: newclosed

Thanks Bas, the updated package has been pulled to nightly ppa.

Note: See TracTickets for help on using tickets.