This is broken with the latest Mapnik
OSM-Solar looks really great! However, it seems it can't be used with the latest mapnik version(s), at least 2.2.0. When trying to use it with Tilestache (using the given tilestache.cfg and changing paths) I get
ERROR:gunicorn.error:Error handling request
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 126, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/opt/TileStache/TileStache/Goodies/StatusServer.py", line 214, in __call__
response = TileStache.WSGITileServer.__call__(self, environ, start_response)
File "/opt/TileStache/TileStache/__init__.py", line 381, in __call__
status_code, headers, content = requestHandler2(self.config, path_info, query_string, script_name)
File "/opt/TileStache/TileStache/__init__.py", line 254, in requestHandler2
status_code, headers, content = layer.getTileResponse(coord, extension)
File "/opt/TileStache/TileStache/Core.py", line 425, in getTileResponse
tile = self.render(coord, format)
File "/opt/TileStache/TileStache/Core.py", line 506, in render
tile = provider.renderArea(width, height, srs, xmin, ymin, xmax, ymax, coord.zoom)
File "/opt/TileStache/TileStache/Mapnik.py", line 133, in renderArea
self.mapnik = get_mapnikMap(self.mapfile)
File "/opt/TileStache/TileStache/Mapnik.py", line 422, in get_mapnikMap
mapnik.load_map(mmap, str(mapfile))
RuntimeError: Failed to parse expression: "name" in rule 'rule 367' in style 'text style 106 (name)' in TextSymbolizer at line 1704 of '/usr/local/share/maps/style/OSM-Solar-master/tile-style.xml'
which someone else was getting in late 2013 and documented in this question.
Trying to manually build the stylesheet with Cascadenik, I get an error:
Traceback (most recent call last):
File "/usr/local/bin/cascadenik-compile.py", line 100, in <module>
sys.exit(main(layersfile, outputfile, **options.__dict__))
File "/usr/local/bin/cascadenik-compile.py", line 33, in main
cascadenik.load_map(mmap, src_file, dirname(realpath(dest_file)), **load_kwargs)
File "/usr/local/lib/python2.7/dist-packages/cascadenik/__init__.py", line 90, in load_map
compile(src_file, dirs, verbose, datasources_cfg=datasources_cfg, user_styles=user_styles, scale=scale).to_mapnik(map, dirs)
File "/usr/local/lib/python2.7/dist-packages/cascadenik/output.py", line 86, in to_mapnik
lay.datasource = layer.datasource.to_mapnik()
File "/usr/local/lib/python2.7/dist-packages/cascadenik/output.py", line 155, in to_mapnik
return mapnik.Datasource(**self.parameters)
File "/usr/lib/python2.7/dist-packages/mapnik/__init__.py", line 320, in Datasource
return CreateDatasource(keywords)
RuntimeError: Postgis Plugin: Bad connection
Connection string: 'host=127.0.0.1 dbname=gis user=gis connect_timeout=4'
which someone was talking about more recently, December 2014, on a mailing list. They were told at the time that this was too old to run.
Wondering if there is a way to bring OSM-Solar up to the latest Mapnik standards (and I'm guessing get it onto CartoCSS since Cascadenik looks dead-ish). If not, then I hope this message is found by someone before trying to get this style working in Mapnik, since at this point it seems like it won't work.