Text split extension doesn't work with absolute X coordinates lists

Bug #1426389 reported by p90
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Low
Unassigned

Bug Description

Hi,

while trying to use the split text extension, I noticed a bug.
I tried to split a line into words but get the following error:
Traceback (most recent call last):
  File "split.py", line 218, in <module>
    b.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 268, in affect
    self.effect()
  File "split.py", line 205, in effect
    nodes = self.split_words(node)
  File "split.py", line 118, in split_words
    x = float(line.get("x"))
ValueError: invalid literal for float(): 163.22353 213.23334 220.00522 266.94574 273.71765 320.34149 327.1134 374.05392 380.82581 427.44968 434.22156 481.16208 487.93402 534.5578 541.32971 588.2702 595.04218 641.66602 648.43787

For me, it looks like it expects to get one coordinate at a time but gets all of them in one go for some reason.
Whatever it is, the extension does not seem to be working if you want to split a text into words.

I added the svg file with the line I wanted to split as an attachment.

Revision history for this message
p90 (acc-ubuntuone) wrote :
Revision history for this message
p90 (acc-ubuntuone) wrote :

Ah, forgot to mention I am running Inkscape 0.91 r13725.

jazzynico (jazzynico)
tags: added: extensions-plugins text
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Crunchbang Waldorf, Inkscape trunk revision 13951.

The error is due to the fact that each character of your text has an absolute position (the x attribute of the text and span elements has one value per character). And apparently, the extension doesn't handle that kind of text that, if I remember correctly, can't be created in Inkscape (excepted with the XML editor...) directly but can show when importing text from PDF files.

That said, the span contains a single "word": 0102030405060708090, that can't be split in words. The best you can do with it is:
1. Select the text and use Text>Remove manual kerns.
2. Use the Extension>Split Text extension in "letters" mode.
But it's not exactly what you want...

Changed in inkscape:
status: New → Confirmed
summary: - Text split extension not working for words
+ Text split extension doesn't work with absolute X coordinates lists
Changed in inkscape:
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Nathan Lee (nathan.lee) wrote :

No updates on the issue, but closing as part of migration to GitLab. Issue is still tracked at https://gitlab.com/inkscape/extensions/-/issues/142

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

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.