Error while opening dxf file.

Bug #372372 reported by dopelover
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

I got following error message while opening attached dxf file:

Traceback (most recent call last):
  File "/usr/local/share/inkscape/extensions/dxf_input.py", line 387, in <module>
    layer = layer_nodes[vals[groups['8']][0]]
KeyError: u'0'

Inkscape r21287

Tags: dxf importing
Revision history for this message
dopelover (dopelover) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

- two separate problems were encountered with this file, one was fixable, one not fixable.
- the crash above was caused by the fact that no layers were defined in the dxf file. This has been fixed and committed to svn rev 21294. The dxf file will now load, but unfortunately only the text will show, not the contour lines. Exactly the same behaviour is shown by QCad, which refuses to display the lines. Voloview will display the lines, but it is not an editor, so it cannot be used to fix the problem.
    I was not able to determine the AutoCad release number for this file because it does not have an entry for the variable $ACADVER. However, from the syntax of the line data, it appears that it is earlier than Release 13, and this input routine supports only Release 13 and newer.
    I would recommend opening this in an AutoCAD editor and saving it as Release 13, and then load it into Inkscape.

Changed in inkscape:
status: New → Fix Committed
su_v (suv-lp)
tags: added: dxf importing
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Steve Baker (y9a7s7tjd2-s1eac-si9yrl01qs) wrote :

Still crashing with this exact error message in Inkscape 0.48 under both Linux (OpenSuse 11) and Windows 7 (basic edition). (Feb 5th 2012)...I'm exporting DXF from blender - so it's unclear which version of AutoCAD the file is intended to track.

I'm trying to forge a path from Blender to Inkscape - two key OpenSource tools that are unable to talk. Blender's SVG exporter is broken in 2.6x and Inkscape's DXF importer is similarly broken and they have no other file formats in common...Argh!

Revision history for this message
Alvin Penner (apenner) wrote :

sorry, this response sort of got lost in the shuffle somewhere.
There are two things you can do, both are workarounds, but they may help.
- you can download the most recent version of the input routines dxf_input.py and dxf_input.inx from the site (this may fix the crash):
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/share/extensions/
- you can install QCad and use it to convert the dxf file to a Release 13 version. This is the default format when QCad saves a dxf file.
- if neither of these procedures helps, then perhaps you could re-open this report and give details of the status.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.