-
Notifications
You must be signed in to change notification settings - Fork 56
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
Group instance has no attribute 'name' #16
Comments
I just tried it again and that example still works for me. What version of Python are you running?
That doesn't make sense to me, do you mean |
Thanks Kasbah,
I'm working in Windows. The "C:\svg2mod>" is the shell prompt. I used exactly the same command line as you did in your Nov 17, 2016 posting to svg2mod issue "Problems converting..". (I used your command line and your SVG file, to eliminate those items as possible issues.) Python identifies itself with: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32 Could I perhaps have svg.py set up incorrectly? My directory tree looks like this:
|
You say you are invoking What do you mean "set up", you should be able to just clone the repository and use that. Alternatively you can download a zip of the repo and unpack it. Your svg folder doesn't look like the one in the repo. |
Thanks again Kasbah, That was exactly my problem. That is, when I tried running svg2mod on its own, it complained about svg.py missing, so I downloaded that package separately and I obviously botched the installation. It would be helpful if the Readme.md file included install instructions, such as you have just provided. Now that I have svg2mod working, I seem to have found a bug. I'm trying to convert some text to a logo. The conversion is almost correct, but the center of the 'O's are drooping. I'll look into that some more, and report it separately, if it's not something that I'm doing incorrectly. |
Good stuff, the image looks a bit like svg2mod doesn't fully understand the enclosed paths. I wrote about how to handle that on the kicad.info forum a while back. If you are still having problems with it you should open a separate issue. |
Thanks once more, I had no idea what I was doing, but I was able to follow your procedure and even simplify it somewhat, since I needed to generate "positive" text. It worked perfectly. "You say you are invoking svg2mod but you don't have an svg2mod executable, only and svg2mod.py executable, so I am a bit confused by that." I'm not sure how it works either. I know that the MS-DOS shell will execute batch files without a ".BAT" extension. Perhaps the Python installer adds some entry to the registry that makes it work. |
Do you think this OK to be closed or is there something unresolved remaining? |
I can't get svg2mod to work. I put svg2mod.py in its own directory and svg.py etc in an "svg" subdirectory. When I run svg2mod with @kasbah's "https://kaspar.h1x.com/oshwa-2.4.svg", (see svg2mod issue "Problems converting.."), I see the following:
`C:\svg2mod>svg2mod -i oshwa-2.4.svg --format pretty -p 1.0
Parsing SVG...
No handler for element {http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}namedview
No handler for element {http://www.w3.org/2000/svg}metadata
No handler for element {http://www.w3.org/2000/svg}defs
Traceback (most recent call last):
File "C:\svg2mod\svg2mod.py", line 1436, in
File "C:\svg2mod\svg2mod.py", line 98, in main
File "C:\svg2mod\svg2mod.py", line 721, in write
File "C:\svg2mod\svg2mod.py", line 568, in _prune
AttributeError: Group instance has no attribute 'name'`
I know next to nothing about Python. Does anybody have any idea what I might be doing wrong?
The text was updated successfully, but these errors were encountered: