Page MenuHome

SVG import is really finicky in 2.81
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.08

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-10-29 20:49, hash: rBaff6446e064f
Worked: 2.80 stable{F7873112}

Short description of error

Two files are attached. They both contain only vector path information, and no rasterized graphics.

I'm able to successfully import the attached SVG file test1.svg in 2.80, but not in 2.81

In order to troubleshoot the problem, I removed the long rectangular shape and saved the SVG file as test2.svg
Now, I am able to successfully import the file in 2.81.

Exact steps for others to reproduce the error
In 2.81, try to import the attached SVG file test1.svg (File>Import>SVG). Expected result: fail.

In 2.81, try to import the attached SVG file test2.svg (File>Import>SVG). Expected result: success.

Details

Type
Bug

Event Timeline

I can confirm this error (Blender 2.81.16) on Linux with the SVG importer on Official repos.

This is the error it shows:

Traceback (most recent call last):
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/__init__.py", line 59, in execute
    return import_svg.load(self, context, filepath=self.filepath)
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1882, in load
    load_svg(context, filepath, do_colormanage)
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1872, in load_svg
    loader.parse()
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1085, in parse
    ob = parseAbstractNode(node, self._context)
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1856, in parseAbstractNode
    ob.parse()
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1085, in parse
    ob = parseAbstractNode(node, self._context)
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1856, in parseAbstractNode
    ob.parse()
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 1134, in parse
    pathParser = SVGPathParser(d, self._styles['useFill'])
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 508, in __init__
    self._data = SVGPathData(d)
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/import_svg.py", line 420, in __init__
    token, last_char = read_float(d, i)
  File "/usr/share/blender/2.81/scripts/addons/io_curve_svg/svg_util.py", line 88, in read_float
    raise Exception('Invalid float value near ' + text[start_index:start_index + 10])
Exception: Invalid float value near .188-1.392

location: <unknown location>:-1

But it works with Howard's AI/PDF/SVG importer/exporter on contrib repos.

I forgot to include the error text. Thank you.