mtl/svg2mod

module has no attribute 'parse'

Closed this issue · 4 comments

Had a quick look through the included svg library but didn't spot anything obvious.

./svg2mod.py -i examples/dt-logo.svg
Parsing SVG...
Traceback (most recent call last):
File "./svg2mod.py", line 1433, in
main()
File "./svg2mod.py", line 39, in main
args.module_value
File "./svg2mod.py", line 444, in init
self.svg = svg.parse( file_name )
AttributeError: 'module' object has no attribute 'parse'

Hey Matt!

I just tried it with a fresh clone and can't reproduce it. Maybe something weird is going on with the imports. Have you tried it in a virtualenv?

huh, yes just tried in a virtual env and no no problems. I thought any svg module I'd already have installed would be overridden by the one included.

That doesn't seem to be the case and it appears to be non trivial to load relative imports in a script in a non-hacky way. This should probably be fixed somehow to avoid this issue in the future so I would recommend to re-open it. What SVG package do you have installed?

It's a very strangely named package called svg.path that installs itself
like svg/path/ so you can import svg and get nothing.

On 16 November 2016 at 18:32, Kaspar Emanuel notifications@github.com
wrote:

That doesn't seem to be the case and it appears to be non trivial to load
relative imports in a script in a non-hacky way
https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time.
This should probably be fixed somehow to avoid this issue in the future so
I would recommend to re-open it. What SVG package do you have installed?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#11 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAmtbKF9K1pbV-Y3fgBHvfPZ47ecxSrOks5q-z4ngaJpZM4K0CAR
.

Matthew Venn
web mattvenn.net twitter @matthewvenn https://twitter.com/matthewvenn