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

gfill is NoneType #35

Open
JohnMcCann opened this issue May 8, 2020 · 1 comment
Open

gfill is NoneType #35

JohnMcCann opened this issue May 8, 2020 · 1 comment

Comments

@JohnMcCann
Copy link

I got the error:

File "./readme2tex/render.py", line 180, in render
    gfill.set('fill-opacity', '0.9')
AttributeError: 'NoneType' object has no attribute 'set'

For whatever reason my environment's rendertex() was returning svgs with "http" instead of "https". A quick fix was to change the gfill and use variables in render.py to find the correct string.

gfill = xml.find('{http://www.w3.org/2000/svg}g')
gfill.set('fill-opacity', '0.9')
if not block:
    uses = gfill.findall('{http://www.w3.org/2000/svg}use')

If someone knows why my environment did that please let me know. It might also be nice to add some kind of check in the code to prevent the end user from having to alter this.

@JeffDeCola
Copy link

I had the same issue and don't know why.
But this quick fix worked great.

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