Exporting as DXF File Fails with gradient strokes

Bug #810503 reported by TonyNo on 2011-07-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Alvin Penner

Bug Description

Using latest beta (inkscape_r10414-201107042125.7z), this error is reported...

  File "C:\inkscapebeta\share\extensions\simplestyle.py", line 215, in parseColor

    r=int(c[1:3],16)

ValueError: invalid literal for int() with base 16: 'rl'

TonyNo (azimuth2) wrote :

Also same with 0.48.1.

TonyNo (azimuth2) wrote :

Ah. May be an issue with gradient strokes. Why not just strip that?

su_v (suv-lp) wrote :

Please provide additional information:
1) Which OS are you using? Do other python-based extensions work as expected?
2) Could you attach a sample SVG file which fails (with the quoted error message) to save as "Desktop Cutting Plotter (R13) (*.dxf)" in the latest stable release and a recent development snapshot build? It would be helpful and allow easier testing with different versions/platforms.

Changed in inkscape:
status: New → Incomplete
tags: added: dxf exporting
TonyNo (azimuth2) wrote :

I just tested it by replacing all gradient strokes with solid colors and it worked fine.

TonyNo (azimuth2) wrote :

This is in Windows.

su_v (suv-lp) wrote :

<off-topic>
> This is in Windows.

Thx, that much was already obvious from your quoted error message.
</off-topic>

Changed in inkscape:
status: Incomplete → New
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48.1 and 0.48+devel r10450 on Mac OS X 10.5.8, with Python 2.6.6
saving attached SVG as DXF fails with this error message:

Traceback (most recent call last):
  File "dxf_outlines.py", line 255, in <module>
    e.affect()
  File "/Volumes/green/mp-inkscape/src/inkscape-trunk/Build/share/inkscape/extensions/inkex.py", line 227, in affect
    self.effect()
  File "dxf_outlines.py", line 246, in effect
    self.process_group(doc)
  File "dxf_outlines.py", line 217, in process_group
    self.process_group(node)
  File "dxf_outlines.py", line 219, in process_group
    self.process_path(node, self.groupmat[-1])
  File "dxf_outlines.py", line 165, in process_path
    rgb = simplestyle.parseColor(style['stroke'])
  File "/Volumes/green/mp-inkscape/src/inkscape-trunk/Build/share/inkscape/extensions/simplestyle.py", line 215, in parseColor
    r=int(c[1:3],16)
ValueError: invalid literal for int() with base 16: 'rl'

summary: - Exporting as DXF File Fails
+ Exporting as DXF File Fails with gradient strokes
Changed in inkscape:
status: New → Confirmed
importance: Undecided → Medium
Alvin Penner (apenner) wrote :

thanks for the sample svg file, I'll take a look at this next week.

Alvin

Alvin Penner (apenner) wrote :

- attached is a modified version of dxf_outlines.py.
- this version avoids the crash by checking to confirm that the color is a valid color before attempting to interpret it.

Alvin Penner (apenner) wrote :

committed to bzr rev 10485

Changed in inkscape:
status: Confirmed → Fix Committed
su_v (suv-lp) on 2011-07-21
tags: added: backport-proposed
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.49
Krzysztof Kosinski (tweenk) wrote :

Updated extension copied to stable in 9865

tags: removed: backport-proposed
Changed in inkscape:
milestone: 0.49 → 0.48.3
Ted Gould (ted) on 2012-02-15
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers