I am trying to build an SVG that would feature lines, each line would link to a part elsewhere in the same document. I keep getting a ValueError
, however, stating that "Invalid children 'line' for svg-element <a>.
"
This MWE reproduces the error:
import svgwrite
test = svgwrite.Drawing('test.svg', profile='tiny',size=(100, 100))
link = test.add(test.a('http://stackoverflow.com'))
link.add(test.line(start=(0,0),end=(100,100)))
test.save()
I get the same error with other drawing elements (ellipsis, rect, etc), but these are certainly allowed as children of a link.
What am I missing?
Python version: 2.7.10
svgwrite version: 1.1.6 (reported by pkg_resources
)