Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expecting a nonnegative number in path #279

Open
IceflowRE opened this issue May 5, 2021 · 0 comments
Open

Expecting a nonnegative number in path #279

IceflowRE opened this issue May 5, 2021 · 0 comments

Comments

@IceflowRE
Copy link

IceflowRE commented May 5, 2021

Iam not sure if Inkscape creates invalid svgs or what exactly happened.

<svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
     xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <path id="path958-2-7-5-5-7-5-9-3" style="color:#000000;fill:#ffffff;stroke-linecap:round" d="m 752,472 a -40,40 0 0 1 40,40 -40,40 0 0 1 -40,40 h -26.94922 a -120,120 0 0 0 6.9492,-40 -120,120 0 0 0 -6.9492,-40 z m -253.12502,0 a -120,120 0 0 0 -6.875,40 -120,120 0 0 0 6.9492,40 h -226.9492 a -40,40 0 0 1 -40,-40 -40,40 0 0 1 40,-40 z"/>
</svg>

log

  File "symbconv\export.py", line 32, in optimize_svg
    scour.start(options, in_file, out_file)
  File "scour\scour.py", line 4152, in start
    out_string = scourString(in_string, options, stats=stats).encode("UTF-8")
  File "scour\scour.py", line 3805, in scourString
    clean_path(elem, options, stats)
  File "scour\scour.py", line 2282, in clean_path
    path = svg_parser.parse(oldPathStr)
  File "scour\svg_regex.py", line 160, in parse
    return self.rule_svg_path(next_val_fn, token)
  File "scour\svg_regex.py", line 168, in rule_svg_path
    command_group, token = rule(next_val_fn, token)
  File "scour\svg_regex.py", line 235, in rule_elliptical_arc
    raise SyntaxError("expecting a nonnegative number; got %r" % (token,))
SyntaxError: expecting a nonnegative number; got ('float', '-40')

Version: 897e3f5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant