-
Notifications
You must be signed in to change notification settings - Fork 27
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
Receiving Error on Line 29 of generate-xml.py #2
Comments
Oh, I haven't tried generating the stencil collection on Windows, so I suspect it could be a Windows-specific problem. It looks like the regex I'm using to extract the icon name from its file path isn't matching anything, probably because Windows uses backslashes (rather than forward slashes) in its paths. I'll hopefully just need to change it so that it's matching against a platform-independent path. I'll try and get it fixed tomorrow some time. Cheers for the report. Edit: I'm away from a computer at the moment, but if you're wanting to try and get it working, try replacing |
Interesting. I just set up Python on Windows and am getting the same error. import cairosvg
cairosvg.svg2png(file_obj='./svg.svg', write_to='./svg.png') And am still getting the error, so I don't think it's something wrong with the script - likely we're both doing something incorrect when installing pycairo or it's a bug in cairosvg. I'm now trying to get cairocffi installed, which might fix the problem. And the error (in case anyone is searching it):
|
Update: Installing cairocffi seemed to do the trick! So the steps I followed:
(I'll still need to change the script to use |
That commit fixes any issues I was still getting on Windows, hopefully the steps above now work for you too! |
Everything worked just fine in your steps. The last step (installing GDK+) was my specific issue. Thank you for making this compatible with the Windows environment and the quick response. |
First off, thank you for the work you've done. The Android 5 stencils are incredibly useful. There are issues arising from the python script saying " 'Nonetype' object has no attribute 'group' ". Unfortunately I'm not too familiar with Python script.The error is coming from line 29:
element.set('name', (match.group(1) + ' - ' + match.group(2).replace('_', ' ')).title())
The gen folder is created, but no actions are performed after that. Any suggestions would be much appreciated:
The text was updated successfully, but these errors were encountered: