path WB: regression in FC 0.19

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

path WB: regression in FC 0.19

Postby uwestoehr » Mon Oct 28, 2019 10:58 pm

The path WB does no longer work properly in FC 0.19. I cannot create even a simple pocket.
To reproduce:

1. open this example file:
Path-test.FCStd
test file
(22.89 KiB) Downloaded 10 times
2. Create a path job (use the proposed default settings)

result: After the final press on OK to get the job created, nothing happens, but I get in the report widget these errors:

Code: Select all

PathJobGui.ERROR: 'PySide2.QtWidgets.QDialog' object has no attribute 'widget'
Traceback (most recent call last):
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathJobGui.py", line 1315, in Create
    obj.ViewObject.Proxy.editObject(obj.Stock)
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathJobGui.py", line 195, in editObject
    return self.openTaskPanel('Stock')
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathJobGui.py", line 174, in openTaskPanel
    self.taskPanel = TaskPanel(self.vobj, self.deleteObjectsOnReject())
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathJobGui.py", line 567, in __init__
    self.template = PathJobDlg.JobTemplateExport(self.obj, self.form.jobBox.widget(1))
AttributeError: 'PySide2.QtWidgets.QDialog' object has no attribute 'widget'
3. retry to setup a path job. Now you it works.
4. Create a path pocket (choose a pocket of your choice)
(This is what I have now:
Path-test-pocket-result.FCStd
result after step 4
(35.58 KiB) Downloaded 8 times
)
5. Post process the whole job

result:

Code: Select all

Running the Python command 'Path_Post' failed:
Traceback (most recent call last):
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathPost.py", line 390, in Activated
    (fail, rc) = self.exportObjectsWith(finalpostlist, job)
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathPost.py", line 212, in exportObjectsWith
    gcode = processor.export(objs, filename, postArgs)
  File "D:\FreeCAD-build\Mod\Path\PathScripts\PathPostProcessor.py", line 102, in export
    return self.script.export(obj, filename, args)
  File "D:/FreeCAD-build/Mod/Path/PathScripts//post\centroid_post.py", line 170, in export
    if isinstance(item.Proxy, PathScripts.PathToolController.ToolController):

'_TempObject' object has no attribute 'Proxy'
With FC 0.18.3 I get no problems at all.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18638 (Git)
Build type: Release
Branch: master
Hash: d6fc794aca0d5dd8b6e1d5f99360f792dbf73199
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
chrisb
Posts: 19662
Joined: Tue Mar 17, 2015 9:14 am

Re: path WB: regression in FC 0.19

Postby chrisb » Tue Oct 29, 2019 10:38 am

It still works with the version below. Can you try to reset your settings?

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18589 (Git)
Build type: Release
Branch: master
Hash: 3500451a040989d00693eab85b2a7c13ce4dad67
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

Re: path WB: regression in FC 0.19

Postby uwestoehr » Tue Oct 29, 2019 1:16 pm

chrisb wrote:
Tue Oct 29, 2019 10:38 am
It still works with the version below. Can you try to reset your settings?
...
Version: 0.19.18589 (Git)
I did so but the problem persists. As you cannot reproduce it with rev 0.19.18589 The issue must have been introduced recently between this revision and rev 0.19.18638.
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

Re: path WB: regression in FC 0.19

Postby uwestoehr » Tue Oct 29, 2019 1:27 pm

uwestoehr wrote:
Tue Oct 29, 2019 1:16 pm
As you cannot reproduce it with rev 0.19.18589 The issue must have been introduced recently between this revision and rev 0.19.18638.
This is not true, because when trying with

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18234 (Git)
Build type: Release
Branch: master
Hash: 3af5d97e9b2a60823815f662aba25422c4bc45bb
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

only the first error is gone, the second error - when postprocessing the job - is there as well.

I'll now try a Conda build and report back.
mlampert
Posts: 1381
Joined: Fri Sep 16, 2016 9:28 pm

Re: path WB: regression in FC 0.19

Postby mlampert » Tue Oct 29, 2019 6:48 pm

works for - certainly no help for you though. Given the error you're getting it sounds more like PySide / Qt issue. Maybe our build experts have some insight.

Code: Select all

OS: Debian GNU/Linux bullseye/sid (LXQt//usr/share/xsessions/lxqt)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18638 (Git)
Build type: Debug
Branch: master
Hash: d6fc794aca0d5dd8b6e1d5f99360f792dbf73199
Python version: 3.7.5rc1
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

Re: path WB: regression in FC 0.19

Postby uwestoehr » Tue Oct 29, 2019 7:15 pm

mlampert wrote:
Tue Oct 29, 2019 6:48 pm
works for - certainly no help for you though. Given the error you're getting it sounds more like PySide / Qt issue. Maybe our build experts have some insight.
The 0.19.18234 build is one I downloaded from GitHub , the 0.19.18638 build was built by myself. Both used the LibPack available in the 0.19 release on GitHub.
I cannot test a Conda build because all downloads from GitHub are today super slow and sooner or later terminated. (Seems amazonaws.com has problems.)

However, the error

Code: Select all

  return self.script.export(obj, filename, args)
  File "D:/FreeCAD-build/Mod/Path/PathScripts//post\centroid_post.py", line 170, in export
    if isinstance(item.Proxy, PathScripts.PathToolController.ToolController):

'_TempObject' object has no attribute 'Proxy'
sounds strange. Note also the wrong double slashes in the path:
D:/FreeCAD-build/Mod/Path/PathScripts//post\centroid_post.py
____________________________________^
mlampert
Posts: 1381
Joined: Fri Sep 16, 2016 9:28 pm

Re: path WB: regression in FC 0.19

Postby mlampert » Tue Oct 29, 2019 7:30 pm

uwestoehr wrote:
Tue Oct 29, 2019 7:15 pm

Code: Select all

  return self.script.export(obj, filename, args)
  File "D:/FreeCAD-build/Mod/Path/PathScripts//post\centroid_post.py", line 170, in export
    if isinstance(item.Proxy, PathScripts.PathToolController.ToolController):

'_TempObject' object has no attribute 'Proxy'
sounds strange. Note also the wrong double slashes in the path:
D:/FreeCAD-build/Mod/Path/PathScripts//post\centroid_post.py
____________________________________^
Double slashes are typically not an issue and it seems the python interpreter can find your file - so even the backslash seems to be OK. I have no idea what a _TempObject is and what it's doing there though.
chrisb
Posts: 19662
Joined: Tue Mar 17, 2015 9:14 am

Re: path WB: regression in FC 0.19

Postby chrisb » Tue Oct 29, 2019 7:44 pm

I can retry when the new MacOS version is out.
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

Re: path WB: regression in FC 0.19

Postby uwestoehr » Wed Oct 30, 2019 11:26 am

uwestoehr wrote:
Tue Oct 29, 2019 7:15 pm
I cannot test a Conda build because all downloads from GitHub are today super slow and sooner or later terminated. (Seems amazonaws.com has problems.)
I got it now:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18640 (Git)
Build type: Release
Branch: master
Hash: 2251f53eb5af097cbb4b879af89575132660e541
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

I get the same error. But I see now that it is related to the output processor. I use the default "centroid". When using e.g. "grbl", I get no error and a correct output.

I investigated a bit and I encountered this:

centroid:

Code: Select all

Running the Python command 'Path_Post' failed:
Traceback (most recent call last):
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPost.py", line 390, in Activated
    (fail, rc) = self.exportObjectsWith(finalpostlist, job)
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPost.py", line 212, in exportObjectsWith
    gcode = processor.export(objs, filename, postArgs)
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPostProcessor.py", line 102, in export
    return self.script.export(obj, filename, args)
  File "C:/FreeCAD/FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015/Mod/Path/PathScripts//post\centroid_post.py", line 170, in export
    if isinstance(item.Proxy, PathScripts.PathToolController.ToolController):

'_TempObject' object has no attribute 'Proxy'
jtech:

Code: Select all

Running the Python command 'Path_Post' failed:
Traceback (most recent call last):
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPost.py", line 390, in Activated
    (fail, rc) = self.exportObjectsWith(finalpostlist, job)
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPost.py", line 212, in exportObjectsWith
    gcode = processor.export(objs, filename, postArgs)
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPostProcessor.py", line 102, in export
    return self.script.export(obj, filename, args)
  File "C:/FreeCAD/FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015/Mod/Path/PathScripts//post\jtech_post.py", line 222, in export
    gfile = pythonopen(filename, "wb")

name 'pythonopen' is not defined
philips:

Code: Select all

Running the Python command 'Path_Post' failed:
Traceback (most recent call last):
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPost.py", line 390, in Activated
    (fail, rc) = self.exportObjectsWith(finalpostlist, job)
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPost.py", line 212, in exportObjectsWith
    gcode = processor.export(objs, filename, postArgs)
  File "C:\FreeCAD\FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015\Mod\Path\PathScripts\PathPostProcessor.py", line 102, in export
    return self.script.export(obj, filename, args)
  File "C:/FreeCAD/FreeCAD_0.19.18640_x64_Conda_Py3QT5-WinVS2015/Mod/Path/PathScripts//post\philips_post.py", line 389, in export
    if c.Parameters >= 1:

'>=' not supported between instances of 'dict' and 'int'
all other postprocessors work.
chrisb
Posts: 19662
Joined: Tue Mar 17, 2015 9:14 am

Re: path WB: regression in FC 0.19

Postby chrisb » Wed Oct 30, 2019 5:33 pm

I will wait for the new version and check (at least the philips post processor).