Arch and Draft Workbench failure errors

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
greg_m
Posts: 8
Joined: Sat Oct 29, 2022 9:20 pm

Arch and Draft Workbench failure errors

Post by greg_m »

Hi,

I use FreeCAD for a year or so. I love it.

Used 0.18 (from official Ubuntu repo I think) for a bit, then upgraded to 0.19 (from FreeCAD PPA repo). On 0.19 I've noticed that I can't use Arch workbench as I was getting some errors (I can't remember how it was on 0.18). Kind of forgot about it as I normally don't use Arch.

A few days ago updated it to 0.20.1 from official Ubuntu repo and now Arch and Draft are not working.
Draft workbench would be useful from time to time.

Straight after selecting one of these two workbenches I get the errors as below:

Error pop-up with message:

Workbench failure
<built-in function SoFieldContainer_getField> returned a result with an exception set


And Report view:

Code: Select all

22:08:59  Persistent toolbars: Snapper toolbar not managed.
22:08:59  <built-in function SoFieldContainer_getField> returned a result with an exception set
22:08:59  Traceback (most recent call last):
  File "<string>", line 219, in Activated
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1629, in show
    self.setTrackers()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1673, in setTrackers
    self.grid = trackers.gridTracker()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 972, in __init__
    pick.style.setValue(coin.SoPickStyle.UNPICKABLE)
  File "/usr/lib/python3/dist-packages/pivy/coin.py", line 3989, in __getattr__
    field = self.getField(name)
  File "/usr/lib/python3/dist-packages/pivy/coin.py", line 3873, in getField
    return _coin.SoFieldContainer_getField(self, name)
and:

Code: Select all

22:41:50  Running the Python command 'Arch_Wall' failed:
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Arch/ArchWall.py", line 337, in Activated
    self.tracker = DraftTrackers.boxTracker()
  File "/usr/share/freecad/Mod/Draft/draftguitools/gui_trackers.py", line 1249, in __init__
    m.transparency.setValue(0.8)
  File "/usr/lib/python3/dist-packages/pivy/coin.py", line 3989, in __getattr__
    field = self.getField(name)
  File "/usr/lib/python3/dist-packages/pivy/coin.py", line 3873, in getField
    return _coin.SoFieldContainer_getField(self, name)

<built-in function SoFieldContainer_getField> returned a result with an exception set
I found forum threads from a while back about a similar error on Linux which were related to pivy apparently not being compatible with Python 3.10 or something like that.

Is anyone able to help fixing Arch and Draft workbenches please?

I remember 0.19 was working fine on my work PC with Windows 10. I recently upgraded that also to 0.20.1, so will check if that still works fine after the weekend.

My FreeCAD details are as below:

Code: Select all

OS: Ubuntu 22.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.1.
Build type: Release
Branch: unknown
Hash: 22f524c0c755003c12234fab1bad6a9f696b661a
Python 3.10.6, Qt 5.15.3, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.1
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * kicadStepUpMod 10.16.5
  * ExtremeProLight 1.1.3
  * lattice2 1.0.0
  * Defeaturing 1.2.0
  * ExplodedAssembly
  * fasteners 0.4.19
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Arch and Draft Workbench failure errors

Post by thomas-neemann »

greg_m wrote: Sat Oct 29, 2022 9:36 pm ....
I would try to use the appimage


https://www.freecadweb.org/downloads.php?lang=de
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Arch and Draft Workbench failure errors

Post by chrisb »

See also this topic about the state of the PPA: https://forum.freecadweb.org/viewtopic.php?f=42&t=69055.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
greg_m
Posts: 8
Joined: Sat Oct 29, 2022 9:20 pm

Re: Arch and Draft Workbench failure errors

Post by greg_m »

I'd prefer to use .deb package rather than .AppImage if possible.
I used 0.19 from PPA, but at the moment I'm using FreeCAD 0.20 from the official Ubuntu repo (which just has been released a few days ago).

In meantime I did some reading about the pivy.
On Ubuntu Jammy it's pivy version 0.6.5-1build6, but on Kinetic (released a week ago) it's 0.6.7-0.1, which quite possibly it should work with FreeCAD. I'm going to try it on VirtualBox first and if that work I'll upgrade my main system.

EDIT: It was actually easier than I thought. I updated pivy to Kinetic version as it has still exactly the same dependencies and it works fine now: both Arch and Draft workbenches.

Problem solved!
wilkinsm
Posts: 1
Joined: Fri Dec 23, 2022 7:32 pm

Re: Arch and Draft Workbench failure errors

Post by wilkinsm »

FWIW Just reporting that the above mentioned python3-pivy deb update to the kinetic (22.10) version worked for me on Linux Mint 21 as well.

I note Linux Mint 21.1 depends on Debian jammy (22.04 LTS) as well - so I'm guessing that for non containter debian based installations this workaround will probably be needed for quite a while yet.
User avatar
dpward
Posts: 27
Joined: Sun Jan 01, 2023 6:06 pm
Contact:

Re: Arch and Draft Workbench failure errors

Post by dpward »

Fix released for pivy package in Ubuntu 22.04 LTS (and Ubuntu 22.10).
https://bugs.launchpad.net/ubuntu/+sour ... ug/2000840
Post Reply