Save as html5 fails if there is text on a path
Migrated from https://bugs.launchpad.net/inkscape/+bug/1561443 #### Steps to reproduce: - open Inkscape - Create a path (e.g. straight line) - Create some text - Put text on path - Save as HTML5 Example file: [TextOnArcBug-20160324-01.svg](/uploads/35f4a9d7d11585812e67e393f6a91fd8/TextOnArcBug-20160324-01.svg) #### What happened? No file saved, traceback: ``` /usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import fnmatch, glob, traceback, errno, sys, atexit, locale, imp Traceback (most recent call last): File "ink2canvas.py", line 72, in <module> Html5Canvas().run() File "/home/nal/all/inkscape/share/inkscape/extensions/inkex/base.py", line 123, in run self.save_raw(self.effect()) File "/home/nal/all/inkscape/share/inkscape/extensions/inkex/base.py", line 146, in save_raw self.save(self.options.output) File "ink2canvas.py", line 36, in save self.walk_tree(svg_root, canvas) File "ink2canvas.py", line 67, in walk_tree self.walk_tree(node, canvas) File "ink2canvas.py", line 66, in walk_tree elem.draw() File "/home/nal/all/inkscape/share/inkscape/extensions/ink2canvas_lib/svg.py", line 293, in draw text = self.text_helper(tspan) File "/home/nal/all/inkscape/share/inkscape/extensions/ink2canvas_lib/svg.py", line 268, in text_helper return ts.text + self.text_helper(ts) + ts.tail TypeError: must be str, not NoneType ``` <details><summary>In 0.92.x, traceback</summary> <pre> Traceback (most recent call last): File "ink2canvas.py", line 91, in <module> ink.affect() File "/home/nal/all/ink92/share/inkscape/extensions/inkex.py", line 289, in affect self.effect() File "ink2canvas.py", line 86, in effect self.walk_tree(svg_root) File "ink2canvas.py", line 77, in walk_tree self.walk_tree(node) File "ink2canvas.py", line 76, in walk_tree elem.draw() File "/home/nal/all/ink92/share/inkscape/extensions/ink2canvas/svg.py", line 373, in draw text = self.text_helper(tspan) File "/home/nal/all/ink92/share/inkscape/extensions/ink2canvas/svg.py", line 348, in text_helper return ts.text + self.text_helper(ts) + ts.tail TypeError: coercing to Unicode: need string or buffer, NoneType found </pre> </details> #### Version Info: - Inkscape 1.1-dev (aa764a7b88, 2020-06-18, custom) with extensions@c26c0ec8c4aa7bc4e5164ee4e46cd8b1568de9bc (master today) and the normal extension head, Linux Mint 19.1 - Also occurs in 0.92.5, but error message differs a bit - Originally reportedin 0.91
issue