postprocessing error

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
adamLange
Posts: 75
Joined: Sun May 24, 2015 12:15 am

postprocessing error

Post by adamLange »

Whenever I attempt to post process I get the error below:

This is a 0.17 build, commit: 541d767335047a634f7d5e37594822341767b5d0

Any ideas what I should be looking at? Any other information I can provide?

Thanks!
Adam

Code: Select all

<unknown exception data>Traceback (most recent call last):
  File "<string>", line 4, in <module>
<type 'exceptions.RuntimeError'>: <unknown exception data>
Running the Python command 'Path_Post' failed:
Traceback (most recent call last):
  File "/home/adam/FreeCAD/build/Mod/Path/PathScripts/PathPost.py", line 212, in Activated
    (fail, rc) = self.exportObjectsWith(selected, job)
  File "/home/adam/FreeCAD/build/Mod/Path/PathScripts/PathPost.py", line 182, in exportObjectsWith
    gcode = processor.export(objs, filename, postArgs)
  File "/home/adam/FreeCAD/build/Mod/Path/PathScripts/PathPostProcessor.py", line 81, in export
    return self.script.export(obj, filename, args)
  File "/home/adam/FreeCAD/build/Mod/Path/PathScripts/linuxcnc_post.py", line 176, in export
    dia = PostUtils.GCodeEditorDialog()
  File "/home/adam/FreeCAD/build/Mod/Path/PathScripts/PostUtils.py", line 112, in __init__
    self.move(posX, posY)

<unknown exception data>
adamLange
Posts: 75
Joined: Sun May 24, 2015 12:15 am

Re: postprocessing error

Post by adamLange »

Here's a little more info:

I think exception is coming from here:

Code: Select all

    # restore placement and size
        self.paramKey = "User parameter:BaseApp/Values/Mod/Path/GCodeEditor/"
        params = FreeCAD.ParamGet(self.paramKey)
        posX = params.GetInt("posX")
        posY = params.GetInt("posY")
        if posX > 0 and posY > 0:
            self.move(posX, posY)       # exception thrown here
        width = params.GetInt("width")
        height = params.GetInt("height")
        if width > 0 and height > 0:
            self.resize(width, height)
Is it this error something to do with positioning the gcode editor window?
chrisb
Veteran
Posts: 53943
Joined: Tue Mar 17, 2015 9:14 am

Re: postprocessing error

Post by chrisb »

Which postprocessor (PP) do you use? And what exactly did you do? How did you select your PP? Did you select the PP in the job?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
adamLange
Posts: 75
Joined: Sun May 24, 2015 12:15 am

Re: postprocessing error

Post by adamLange »

I managed to catch the error... on video!

https://youtu.be/EeOU_ftIc14
chrisb
Veteran
Posts: 53943
Joined: Tue Mar 17, 2015 9:14 am

Re: postprocessing error

Post by chrisb »

Hi Adam,
I hope you understand that it is difficult to reproduce the error, because your video contains very much stuff that has probably nothing to do with the error. It is already a complicated object and the development does not look really target-oriented in all it's steps. It would be very kind if you reduce your error message to its essentials. To be honest: I was already a bit fed up after waiting more than 7 minutes until something interesting started. So please do the following:
- Make a cube
- make a pocket
- create a job
- create your path
- if the postprocessor yields the error, post your file here.

- And post your FreeCAD info.
Thanks
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: postprocessing error

Post by mlampert »

Hey Adam,
first off, to answer your question - the machine limits and such are filled in by the linuxcnc post processor.

I tried to follow your steps, obviously with a different model, but I can't reproduce your isssue. You obviously have a newer build (new icons looking good :) ). So there's the possibility this is an environment or build issue. How did you get the binary?
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: postprocessing error

Post by sliptonic »

Hi Adam,
Thanks for the video. So far, I can't reproduce the problem.
As a possible work around for post processing, try setting this argument on the post processor: --no-show-editor

I think you're right that the values are either positioning the gcode editor. You could check the stored values by using the menu Tools-> Edit Parameters.
I think there's a bug where the key has a trailing slash and is writing the values into an empty group but I have no idea why it would suddenly cause a problem now for you.

I'll continue to test.
adamLange
Posts: 75
Joined: Sun May 24, 2015 12:15 am

Re: postprocessing error

Post by adamLange »

Thank you for all of you replies.

I built this from source here's the info from 'about':

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9453 (Git)
Build type: Unknown
Branch: (detached from 0.16_pre)
Hash: b16fbcd4eeb9a5f9195c500e2693cba25a7916d2
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1.oce-0.16


I added the flag: --no-show-editor and now it's writing the post-processed information to the file (whoo hoo!).

I'm looking through Tools->Edit Parameters now to see if I can find anything interesting.
adamLange
Posts: 75
Joined: Sun May 24, 2015 12:15 am

Re: postprocessing error

Post by adamLange »

There were some wild numbers in tools->Edit parameters:

http://imgur.com/a/vb212

I put in some reasonable values and now it's working, no problems. I removed the --no-show-editor flag, and when I post process, the editor opens and the file is exported.

Thanks again!
chrisb
Veteran
Posts: 53943
Joined: Tue Mar 17, 2015 9:14 am

Re: postprocessing error

Post by chrisb »

Sorry for the rough tone yesterday. It was probably far too late to try answering questions. Im glad you sorted it out.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply