mecamira / dxf2gcode

Automatically exported from code.google.com/p/dxf2gcode
0 stars 0 forks source link

Config file version mismatch not reported properly #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using latest SVN version (r451 from 2013-11-29 11:50:11)
2. config/config.cfg at version 6
3. Bash: "python dxf2gcode.py"
4. System stops with a traceback as it is expecting version 7 file

What is the expected output? What do you see instead?
Expect the VersionMismatchError to be caught and user-friendly message shown.
Get a traceback instead:
dxf2gcode/source$ python dxf2gcode.py 
Traceback (most recent call last):
  File "dxf2gcode.py", line 858, in <module>
    g.config = MyConfig()
  File "/home/jbradshaw/software/dxf2gcode/dxf2gcode/source/Core/Config.py", line 200, in __init__
    self.load_config()
  File "/home/jbradshaw/software/dxf2gcode/dxf2gcode/source/Core/Config.py", line 264, in load_config
    raise VersionMismatchError, (fileversion, CONFIG_VERSION)
d2gexceptions.VersionMismatchError
dxf2gcode/source$

Please use labels and text to provide additional information.

Original issue reported on code.google.com by johninla...@googlemail.com on 30 Nov 2013 at 10:21

GoogleCodeExporter commented 9 years ago
Hi John,

i think i already tried to catch the failure but didn't succeed until now. 
However i try to look into the failure again during my Christmas Holidays. Feel 
free to try it as well, maybe you know this mechanism better then me.

regards
Christian 

Original comment by christian.kohloeffel on 1 Dec 2013 at 10:41

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r462.

Original comment by johninla...@googlemail.com on 21 Jan 2014 at 12:55

GoogleCodeExporter commented 9 years ago
Fixed with commit 462

My local postpro_config/postpro_config.cfg was outdated.

Had thought it was the main config/config.cfg file as the user-friendly message 
wasn't being displayed (due to calling tr() - now removed).

Would be good to show which filename is being referred to... something for the 
wishlist.

Original comment by johninla...@googlemail.com on 21 Jan 2014 at 12:59

GoogleCodeExporter commented 9 years ago
Hi all.
Sorted.  It was due to an outdated postpro config file but there was a
self.tr() call around the error message so it wasn't being displayed.
Would be good to put the filename into that message, will look at that when
I get a chance.

Also completed the pylint-suggested cleanups over the weekend.

J.

Original comment by johninla...@googlemail.com on 21 Jan 2014 at 1:39