Skip to content
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

Spiral Wrapped Text extension fails if text contains any markup entities #43

Closed
Yura80 opened this issue Apr 13, 2016 · 1 comment
Closed

Comments

@Yura80
Copy link

Yura80 commented Apr 13, 2016

If text contains any '&' entity, such as &, it produces the following error:

Traceback (most recent call last):
File "eggbot_spiraltext.py", line 400, in
e.affect()
File "C:\Program Files (x86)\Inkscape\share\extensions\inkex.py", line 268, in affect
self.effect()
File "eggbot_spiraltext.py", line 366, in effect
markup = processMarkup( self.options.text, self.options.fontfamily )
File "eggbot_spiraltext.py", line 216, in processMarkup
if entity_refs.has_key[eref]:
TypeError: 'builtin_function_or_method' object is unsubscriptable

A small patch is necessary:

diff --git a/inkscape_contributed/eggbot_spiraltext.py b/inkscape_contributed/eggbot_spiraltext.py
index d453f3a..3a0fba2 100755
--- a/inkscape_contributed/eggbot_spiraltext.py
+++ b/inkscape_contributed/eggbot_spiraltext.py
@@ -213,7 +213,7 @@ def processMarkup( text, family='sans' ):
                        j = text.find( ';', i+1 )
                        if ( j != -1 ):
                                eref = text[i:j+1]
-                               if entity_refs.has_key[eref]:
+                               if entity_refs.has_key(eref):
                                        outstr += entity_refs[eref]
                                        i = j + 1
                                else:
oskay added a commit that referenced this issue Apr 13, 2016
@oskay
Copy link
Contributor

oskay commented Apr 13, 2016

Thank you! Accepted, implemented and closed. :)

@oskay oskay closed this as completed Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants