Error when parsing some SVGs
alexanderadam opened this issue · comments
This is the backtrace:
example 1:
Traceback (most recent call last):
File "/app/mDraw.py", line 530, in loadPic
self.pic = SvgParser.SvgParser(filename,self.scene)
File "/app/SvgParser.py", line 144, in __init__
self.parse(filename)
File "/app/SvgParser.py", line 724, in parse
self.parseChildNodes(root)
File "/app/SvgParser.py", line 717, in parseChildNodes
tf = self.parseNode(n,deep)
File "/app/SvgParser.py", line 690, in parseNode
self.parsePath(node)
File "/app/SvgParser.py", line 417, in parsePath
bzseg = buildQuadraticBezierSegment(pbuff[0],pbuff[1],pbuff[2])
File "/app/SvgParser.py", line 54, in buildQuadraticBezierSegment
segList.append(p2[0], p2[1])
TypeError: append() takes exactly one argument (2 given)
example 2:
Traceback (most recent call last):
File "/app/mDraw.py", line 530, in loadPic
self.pic = SvgParser.SvgParser(filename,self.scene)
File "/app/SvgParser.py", line 145, in __init__
self.parse(filename)
File "/app/SvgParser.py", line 725, in parse
self.parseChildNodes(root)
File "/app/SvgParser.py", line 718, in parseChildNodes
tf = self.parseNode(n,deep)
File "/app/SvgParser.py", line 691, in parseNode
self.parsePath(node)
File "/app/SvgParser.py", line 422, in parsePath
self.lineTo(s[0],s[1])
TypeError: 'float' object is not subscriptable
example 3:
-2 M10 EGG 3200.00 0.00 60.00 A0 B0 S0 U0 D0
0 /app/test.svg
parse-> svg
>> path 1
>> g 1
unknow g
parse-> g
>> path 1
Traceback (most recent call last):
File "/app/mDraw.py", line 530, in loadPic
self.pic = SvgParser.SvgParser(filename,self.scene)
File "/app/SvgParser.py", line 144, in __init__
self.parse(filename)
File "/app/SvgParser.py", line 724, in parse
self.parseChildNodes(root)
File "/app/SvgParser.py", line 713, in parseChildNodes
self.parseChildNodes(n,deep+1)
File "/app/SvgParser.py", line 717, in parseChildNodes
tf = self.parseNode(n,deep)
File "/app/SvgParser.py", line 690, in parseNode
self.parsePath(node)
File "/app/SvgParser.py", line 495, in parsePath
dx=float(ss[ptr])
ValueError: could not convert string to float: '2.621.537'