Exception: fromstring() has been removed. Please call frombytes() instead.

1,125 views
Skip to first unread message

rib...@gmail.com

unread,
Mar 27, 2016, 4:24:01 PM3/27/16
to Tilestache
Hi people,

Do you know about this issue:

MOD_PYTHON ERROR

ProcessId:      22851
Interpreter:    'ip-172-31-16-180.us-west-2.compute.internal'

ServerName:     'ip-172-31-16-180.us-west-2.compute.internal'
DocumentRoot:   '/var/www'

URI:            '/stache/tiles.py/example/10/164/397.png'
Location:       None
Directory:      '/var/www/html/tiles/'
Filename:       '/var/www/html/tiles/tiles.py'
PathInfo:       '/example/10/164/397.png'

Phase:          'PythonHandler'
Handler:        'TileStache::modpythonHandler'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/local/lib/python2.7/dist-packages/TileStache-1.50.1-py2.7.egg/TileStache/__init__.py", line 423, in modpythonHandler
    mimetype, content = requestHandler(config_path, path_info, query_string)

  File "/usr/local/lib/python2.7/dist-packages/TileStache-1.50.1-py2.7.egg/TileStache/__init__.py", line 195, in requestHandler
    status_code, headers, content = requestHandler2(config_hint, path_info, query_string)

  File "/usr/local/lib/python2.7/dist-packages/TileStache-1.50.1-py2.7.egg/TileStache/__init__.py", line 254, in requestHandler2
    status_code, headers, content = layer.getTileResponse(coord, extension)

  File "/usr/local/lib/python2.7/dist-packages/TileStache-1.50.1-py2.7.egg/TileStache/Core.py", line 423, in getTileResponse
    tile = self.render(coord, format)

  File "/usr/local/lib/python2.7/dist-packages/TileStache-1.50.1-py2.7.egg/TileStache/Core.py", line 505, in render
    tile = provider.renderArea(width, height, srs, xmin, ymin, xmax, ymax, coord.zoom)

  File "/usr/local/lib/python2.7/dist-packages/TileStache-1.50.1-py2.7.egg/TileStache/Mapnik.py", line 154, in renderArea
    img = Image.fromstring('RGBA', (width, height), img.tostring())

  File "build/bdist.linux-x86_64/egg/PIL/Image.py", line 2063, in fromstring
    "Please call frombytes() instead.")

Exception: fromstring() has been removed. Please call frombytes() instead.

Peter Devoy

unread,
Apr 5, 2016, 3:16:41 PM4/5/16
to Tilestache
There is an issue on the repo... https://github.com/TileStache/TileStache/issues/237

For me I just changed the code and it worked, not ideal but hopefully by the next time I need to reinstall it will be fixed.
Reply all
Reply to author
Forward
0 new messages