-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error occurred while converting text from LaTeX to SVG #10
Comments
Is this in a new document or an old one? |
I confirm this error. Strange. Will investigate this evening. Please stay tuned! |
I wished to install TeXtext with inkscape and texlive. I installed the followings in order using installers with default setting. 1) Inkscape 0.92.2.exe (Python 2.7 interpreter checked) 2) TexText-Windows-0.7.1.exe |
I have the same issue, but only on one of my two computers/systems. Both have the same setup (as far as I know), but there is obviously some difference between them ... both running Antergos Linux and textext works just fine on one of them. Is there anything I can do to help out with the debugging (maybe compare something between my two systems)? |
It seems that error occurs only for new documents, specifically script fails to extract inkscape version out of non-existing file: Lines 336 to 337 in 4b4de50
I'm not sure what is the real purpose of storing inkscape version, but commenting those two lines out fixes problem for me. An obvious workaround is to save document before using this plugin. |
@sizmailov is right, the problem is the version attribute that TexText stores into its freshly created node. The reason for doing so is that we want to know with which version of Inkscape the node has been created with. History has been shown that it helps when processing nodes which have been created in older versions of Inkscape, e.g. if something has been changed in Inkscape. Now, the problem is the following: If a node is created in an Inkscape document that has not been yet saved (i.e. a new document), then the inkscape version attribute (i.e. I failed to find this error during my testing and obviously I have been working with already saved documents the last weeks only... Workaround: Save the document once before you begin editing with TexText. I will provide a patch the next days. |
Fixes textext#10 "Error occurred while converting text from LaTeX to SVG" Unfortunately when a node processed by TexText comes from an Inkscape document that has never been saved before no version attribute is provided by Inkscape. The corresponding call to the key fails. In these cases no version attribute is stored in the TexText node. It is not ideal but currently I do not see any other solution. Completely ommiting this piece of information is not an option in my opinion. We should grab what can be grabbed.
I provided a fix in the master branch of my fork of the project. You need to replace your |
Jan, indeed I was just trying at a new blank file.
As sizmailov points, there occurs no error when editing an old SVG file by
Inkscape.
I now understand why Pit questioned to Boris if the file is new or old.
Your texttext.py (with #10 correction) works fine!! Thank you for your
Great help.
Tokutan
2018-03-27 23:03 GMT+09:00 Jan Winkler <notifications@github.com>:
… I provided a fix in the master branch of my fork
<https://github.com/jcwinkler/textext> of the project. You need to
replace your textext.py by the one from the branch (make a backup copy
first!). Seems to work at a first glance here, but needs more thorough
testing, of course. Will provide a pull-request as far as testing is
finished.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AkBvs5rlWXvJBI_cZGAYtqzXcy2XDgZSks5tika4gaJpZM4SzRrW>
.
|
Error ocurred while converting text from Latex to svg Alguien que me pueda orientar |
I have installed
Inkscape 0.92.1 r15371
ghostscript 9.06
pstoedit 3.62
When type something in the textext gui and click "preview" I get a preview as expected. When I click "save" a window with the heading "Error occurred while converting text from LaTeX to SVG:" opens, containing the following message:
u'{http://www.inkscape.org/namespaces/inkscape}version' Traceback (most recent call last): File "/home/boris/.config/inkscape/extensions/asktext.py", line 491, in cb_ok self.callback(self.text, self.preamble_file, self.global_scale_factor) File "textext.py", line 224, in <lambda> old_node), File "textext.py", line 337, in do_convert self.document.getroot().attrib['{%s}version' % inkex.NSS["inkscape"]].split(' ')[0]).encode('string-escape') File "lxml.etree.pyx", line 2355, in lxml.etree._Attrib.__getitem__ (src/lxml/lxml.etree.c:62354) KeyError: u'{http://www.inkscape.org/namespaces/inkscape}version'
The text was updated successfully, but these errors were encountered: