Save As Html 5 Canvas fails with [Type?] error in ink2canvas.py

Bug #1561443 reported by Stefan Zientek
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

Hi,

I am trying to save a drawing containing text on a circle as an HTML 5 Canvas with Inkscape 0.91. This fails with the following error:

Traceback (most recent call last):
  File "ink2canvas.py", line 89, in <module>
    ink.affect()
  File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 268, in affect
    self.effect()
  File "ink2canvas.py", line 84, in effect
    self.walk_tree(svg_root)
  File "ink2canvas.py", line 75, in walk_tree
    self.walk_tree(node)
  File "ink2canvas.py", line 74, in walk_tree
    elem.draw()
  File "C:\Program Files\Inkscape\share\extensions\ink2canvas\svg.py", line 370, in draw
    text = self.text_helper(tspan)
  File "C:\Program Files\Inkscape\share\extensions\ink2canvas\svg.py", line 345, in text_helper
    return ts.text + self.text_helper(ts) + ts.tail
TypeError: coercing to Unicode: need string or buffer, NoneType found

The issue can be reproduced (at least by me) by creating a text object and a circle object and then putting the text on the circle and then trying to save as an HTML Canvas. I have attached a file that exhibits the error.

Apoligies if this is a known issue.

Kind regards, Stefan

Revision history for this message
Stefan Zientek (stefan-zientek) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Thanks for taking the time to file a report!

The bug can be reproduced on Xubuntu 15.10, Inkscape 0.91 and trunk rev.14741.
With the trunk version, the traceback lines are a bit different:
----
Traceback (most recent call last):
  File "ink2canvas.py", line 91, in <module>
    ink.affect()
  File "/usr/local/share/inkscape/extensions/inkex.py", line 284, 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 "/usr/local/share/inkscape/extensions/ink2canvas/svg.py", line 369, in draw
    text = self.text_helper(tspan)
  File "/usr/local/share/inkscape/extensions/ink2canvas/svg.py", line 344, in text_helper
    return ts.text + self.text_helper(ts) + ts.tail
TypeError: coercing to Unicode: need string or buffer, NoneType found

tags: added: exporting extensions-plugins
Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/-/issues/3096
Closed by: https://gitlab.com/nathanal

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.