Skip to content

ValueError: could not convert string to float: 'null' #422

Description

@bpfrd

Hello,

I get the below error when I try to convert my svg data to png

File [~\pythonEnv\lib\site-packages\cairosvg\surface.py:410](http://localhost:8888/lab/tree/GraphDL/~/pythonEnv/lib/site-packages/cairosvg/surface.py#line=409), in Surface.draw(self, node)
    407         pass
    409 # Get stroke and fill opacity
--> 410 stroke_opacity = float(node.get('stroke-opacity', 1))
    411 fill_opacity = float(node.get('fill-opacity', 1))
    412 if opacity < 1 and not node.children:

ValueError: could not convert string to float: 'null'

I was wondering how I can fix it?

best

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions