Extension "Text_Extract" stopped working in alpha 1.0
Steps to reproduce:
- open Inkscape
- open attached file - can also be downloaded from
here:
- alternatively, create a text, e.g. "Hello World" in a new file
- from the menu, choose "extensions" -> "text" -> "extract"
- the return message is really misleading, because the script doesn't distinguish between error and sucessful execution (separate ticket)
What happened?
- the returned data is
text_extract.py:55: DeprecationWarning: Effect.selected is now a dictionary in the svg document. Use self.svg.selected instead.
self.selected[node.get('id')] = node
text_extract.py:78: DeprecationWarning: Effect.selected is now a dictionary in the svg document. Use self.svg.selected instead.
x, y, w, h = dimen[self.selected.keys()[0]]
Traceback (most recent call last):
File "text_extract.py", line 147, in <module>
Extract().run()
File "inkex/base.py", line 84, in run
ret = self.effect()
File "text_extract.py", line 78, in effect
x, y, w, h = dimen[self.selected.keys()[0]]
KeyError: u'text5462'
What should have happened?
The script should have returned the text strings in the drawing
NB: Works as expected in Inkscape 0.92.4 (though only on English letters, if there are others like German Umlauts, the script will bail out)
Inkscape Version and Operating System:
- Inkscape Version: 1.0alpha (d7d7b92, 2019-04-16)
- Operating System: Windows
- Operating System version: Windows 7 German Enterprise, Windows 10 Home German
Edited by Dirk Frede