In [5]: svgpathtools.svg2paths2('disvg_output.svg')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-b24a2854f246> in <module>
----> 1 svgpathtools.svg2paths2('../red-chalice/svgtransform/disvg_output.svg')
~/Data/Projects/svgpathtools/svgpathtools/svg_to_paths.py in svg2paths2(svg_file_location, return_svg_attributes, convert_circles_to_paths, convert_ellipses_to_paths, convert_lines_to_paths, convert_polylines_to_paths, convert_polygons_to_paths, convert_rectangles_to_paths)
213 convert_polylines_to_paths=convert_polylines_to_paths,
214 convert_polygons_to_paths=convert_polygons_to_paths,
--> 215 convert_rectangles_to_paths=convert_rectangles_to_paths)
~/Data/Projects/svgpathtools/svgpathtools/svg_to_paths.py in svg2paths(svg_file_location, return_svg_attributes, convert_circles_to_paths, convert_ellipses_to_paths, convert_lines_to_paths, convert_polylines_to_paths, convert_polygons_to_paths, convert_rectangles_to_paths)
176 if convert_circles_to_paths:
177 circles = [dom2dict(el) for el in doc.getElementsByTagName('circle')]
--> 178 d_strings += [ellipse2pathd(c) for c in circles]
179 attribute_dictionary_list += circles
180
~/Data/Projects/svgpathtools/svgpathtools/svg_to_paths.py in <listcomp>(.0)
176 if convert_circles_to_paths:
177 circles = [dom2dict(el) for el in doc.getElementsByTagName('circle')]
--> 178 d_strings += [ellipse2pathd(c) for c in circles]
179 attribute_dictionary_list += circles
180
~/Data/Projects/svgpathtools/svgpathtools/svg_to_paths.py in ellipse2pathd(ellipse)
37 ry = float(ry)
38
---> 39 cx = float(cx)
40 cy = float(cy)
41
TypeError: float() argument must be a string or a number, not 'NoneType'
Reading a file containing below svg throws error.
Below is the error.
SVG definition says, if cx and cy are not specified consider it as "0" https://www.w3.org/TR/SVG11/shapes.html#CircleElementCXAttribute
I dig into the code and found that here default value should be 0