eqtexsvg.py line 72: c.tag should be converted to string first

Bug #1214577 reported by Patrick Wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Alexander

Bug Description

Environment: RHEL 6, Inkscape is installed w/ Gentoo Prefix (also is python-2.7.5)

When using Extensions->Render->LaTeX Formular, I got

'builtin_function_or_method' object has no attribute 'rsplit'

at line 72 in eqtexsvg.py

A workaround is to make such a modification, from:

c_tag = c.tag.rsplit('}',1)[-1]

to:

c_tag = str(c.tag).rsplit('}',1)[-1]

which makes the extension work normally.

I guess it is, prospectively, safer not to convert c.tag into a string using str(), but to guarantee that itself is a string...

description: updated
Revision history for this message
Alvin Penner (apenner) wrote :

could you attach the svg file you were using when this happened?

Revision history for this message
Patrick Wang (745881219-qq) wrote :

@apenner

Like this.

Also, I guess, in line 139 we can have pstoedit to specify the output format itself, since some may use the pre-compiled SVG plugin for pstoedit--instead of GNU libplot--on some platforms under certain conditions...

jazzynico (jazzynico)
tags: added: extensions-plugins latex
Revision history for this message
Alexander (aralni) wrote :

> I got 'builtin_function_or_method' object has no attribute 'rsplit'

What LaTeX formula caused this error?

Changed in inkscape:
assignee: nobody → Alexander (aralni)
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Closing, rsplit doesn't occur in the Render LaTeX extension anymore.

Closed by https://gitlab.com/jhofinger

Changed in inkscape:
status: New → 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.