v0.17-0.18 - Error in postprocessor

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
fbx
Posts: 7
Joined: Fri Jan 26, 2018 12:38 pm

v0.17-0.18 - Error in postprocessor

Post by fbx »

Hi,

it seems that PathPost.py has a problem postprocessing. It smashes
trying to open the file save dialog. If I modify the script to avoid opening the dialog
then everything else seems to work and I get sane outputs.
I'd fix it if I understood where QtGui.qApp should be initialized, but I have no idea.
Why is it uninitialized ?

Cheers
fbx


------------------
Path workbench activated
PathPost.DEBUG: about to postprocess job: Job
PathPost.DEBUG: obj: MillFace
PathPost.DEBUG: obj: Pocket_Shape
PathPost.DEBUG: obj: Profile_Edges
PathPost.DEBUG: obj: Pocket_Shape001
PathPost.DEBUG: obj: TagDressup
PathPost.DEBUG: obj: Profile_Faces002
Running the Python command 'Path_Post' failed:
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Path/PathScripts/PathPost.py", line 259, in Activated
(fail, rc) = self.exportObjectsWith(postlist, job)
File "/Applications/FreeCAD.app/Contents/Mod/Path/PathScripts/PathPost.py", line 187, in exportObjectsWith
filename = self.resolveFileName(job)
File "/Applications/FreeCAD.app/Contents/Mod/Path/PathScripts/PathPost.py", line 140, in resolveFileName
foo = QtGui.QFileDialog.getSaveFileName(QtGui.qApp.activeWindow(), "Output File", filename)

'NoneType' object has no attribute 'activeWindow'
----------------------


My version data:
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13511 (Git)
Build type: Release
Branch: (HEAD detached at 5773170)
Hash: 5773170777f424c932f2088ef92d5f664b7d3c23
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/Switzerland (en_CH)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: v0.17-0.18 - Error in postprocessor

Post by sgrogan »

fbx wrote: Fri Apr 13, 2018 4:06 pm I'd fix it if I understood where QtGui.qApp should be initialized, but I have no idea.
There is a pending Pull Request
"fight the good fight"
berka
Posts: 88
Joined: Sat Aug 22, 2015 9:08 pm

Re: v0.17-0.18 - Error in postprocessor

Post by berka »

sgrogan wrote: Fri Apr 13, 2018 4:42 pm There is a pending Pull Request
I ran into this on 0.17; both the April release and the Latest August release.
I see that the pull request was for :master. Any chance this fix can be applied to 0.17 branch too?


OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
chrisb
Veteran
Posts: 54183
Joined: Tue Mar 17, 2015 9:14 am

Re: v0.17-0.18 - Error in postprocessor

Post by chrisb »

Is there a reason why you don't use 0.18? The release is before the doors and I guess noone will backport things to 0.17.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
berka
Posts: 88
Joined: Sat Aug 22, 2015 9:08 pm

Re: v0.17-0.18 - Error in postprocessor

Post by berka »

I didn't know 0.18 was that close. Is there a release candidate? That's a lot faster than 0.17 took.
Anyway, I'd still rather use a stable version. There are understandably changes to objects and files that break from build-to-build on the development version. I can't risk having my projects broken because of that.
Knowing the fix, I was able to use sed to replace all "qApp" with "QApplication" and fix my problem.
chrisb
Veteran
Posts: 54183
Joined: Tue Mar 17, 2015 9:14 am

Re: v0.17-0.18 - Error in postprocessor

Post by chrisb »

berka wrote: Mon Oct 29, 2018 12:45 am I didn't know 0.18 was that close. Is there a release candidate? That's a lot faster than 0.17 took.
Anyway, I'd still rather use a stable version. There are understandably changes to objects and files that break from build-to-build on the development version. I can't risk having my projects broken because of that.
Knowing the fix, I was able to use sed to replace all "qApp" with "QApplication" and fix my problem.
You can give it a try and install both versions in parallel. 0.18 seems to be more stable than 0.17, many things have been fixed and smoothed.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply