readme2tex
readme2tex copied to clipboard
gfill is NoneType
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.
I had the same issue and don't know why. But this quick fix worked great.