Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

TypeError: float() argument #17

Open
deckar01 opened this issue Dec 29, 2017 · 1 comment
Open

TypeError: float() argument #17

deckar01 opened this issue Dec 29, 2017 · 1 comment

Comments

@deckar01
Copy link

MacOS: v10.12.6
Inkscape: v0.92
paths2openscad: v6 (and master)

Traceback (most recent call last):
  File "paths2openscad.py", line 916, in <module>
    e.affect()
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex.py", line 283, in affect
    self.effect()
  File "paths2openscad.py", line 876, in effect
    self.recursivelyTraverseSvg( self.document.getroot(), self.docTransform )
  File "paths2openscad.py", line 632, in recursivelyTraverseSvg
    x = float( node.get( 'x' ) )
TypeError: float() argument must be a string or a number
@deckar01
Copy link
Author

I didn't have the shape selected before I ran the extension. I downloaded Inkscape just for this extension, so I expected it to use all the paths in the SVG I opened. I wasted a bit of time troubleshooting before realizing this. It might help to detect when nothing is selected and give a more descriptive error message.

FWIW I added a try/except to the line 632 (and 633) and got an error about the "SVG" not being valid. Both error messages seemed to indicate it was an issue with my SVG's encoding. Selecting the object with Inkscape first worked though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant