readme2tex icon indicating copy to clipboard operation
readme2tex copied to clipboard

gfill is NoneType

Open JohnMcCann opened this issue 5 years ago • 1 comments

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.

JohnMcCann avatar May 08 '20 17:05 JohnMcCann

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

JeffDeCola avatar Oct 13 '20 12:10 JeffDeCola