Grbl can't open Eagle file?

Issue #122 invalid
Nathan Vander Wilt created an issue

The attached Grbl export from Eagle opens in version 8.1, but not in 8.3. IIRC, they both log something like this:

python FlatCAM.py
2015-03-02 21:35:52.552 python[18717:507] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
[ERROR] PARSING FAILED. Line 3: D10*
Traceback (most recent call last):
  File "/Users/natevw/Development/Others'/flatcam/FlatCAMWorker.py", line 32, in do_worker_task
    task['fcn'](*task['params'])
  File "/Users/natevw/Development/Others'/flatcam/FlatCAMApp.py", line 1564, in open_gerber
    self.new_object("gerber", name, obj_init)
  File "/Users/natevw/Development/Others'/flatcam/FlatCAMApp.py", line 760, in new_object
    initialize(obj, self)
  File "/Users/natevw/Development/Others'/flatcam/FlatCAMApp.py", line 1552, in obj_init
    gerber_obj.parse_file(filename, follow=follow)
  File "/Users/natevw/Development/Others'/flatcam/camlib.py", line 1164, in parse_file
    self.parse_lines(gstr, follow=follow)
  File "/Users/natevw/Development/Others'/flatcam/camlib.py", line 1555, in parse_lines
    log.debug(self.apertures[current_aperture])
KeyError: '10'

…but 8.1 proceeds and version 8.3 refuses to continue.

postel:flatcam natevw$ git bisect bad
6733ebbfa80891acd16fc4ab646efbda2cf4805a is the first bad commit
commit 6733ebbfa80891acd16fc4ab646efbda2cf4805a
Author: jpcaram <jpcaram@gmail.com>
Date:   Thu Jan 29 15:52:03 2015 -0500

    Refactored paint_connect() and path_connect() to receive and return FlatCAMRTreeStorage objects. Updated unittests acordingly.

:100644 100644 0a89fcaf4f341b9b2a4f069209c804e6e3a4b573 c7ddc82fbe8792510d1ac726edadd83ad82ca521 M  FlatCAMApp.py
:100644 100644 c0b20fc99b6e86e19009abf88a933c976e2c5e97 b46a1f7ec9dcf3fc8dcfa3534c17653b401d4a6d M  camlib.py
:040000 040000 2196ec389f63ac36965f85c15d62dd5bc93255b6 89aaa59decc95b553ee4bd47e7632b8c1bf7df8a M  tests

Comments (3)

  1. Nathan Vander Wilt reporter

    Okay, I was wrong…before when I thought the older FlatCAM had opened it, it was an old import and not the file I had selected.

    So the real problem is just that FlatCAM cannot open this file. The newer version just gives better error for it. (The older version just sits forever with progress part way.)

  2. Juan Pablo Caram repo owner

    The attached file is not valid Gerber. The error shown is saying that tool "10" has not been defined, and in fact is has not. GERBER_RS274X is the correct type. You were probably trying to export RS274D which is obsolete.

  3. Log in to comment