0
votes

I'm getting the following error when I run the program: AttributeError: 'module' object has no attribute 'stroke_linecap'

sym = mapnik.LineSymbolizer()
sym.stroke = mapnik.Stroke(mapnik.Color(171,158,137), 0.5)
sym.stroke_width = 2
sym.stroke_linecap = mapnik.stroke_linecap.ROUND #Error is here 
1
It looks like that library is pretty buggy. Just trying to install from source it barks about missing dependencies... - duhaime

1 Answers

0
votes

I found a similar problem and ended up figuring it out. stroke_linecap isn't used properly. It should be line_cap.

sym.line_cap = mapnik.line_cap.ROUND