SoFieldContainer_getField> returned a result with an exception set

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

SoFieldContainer_getField> returned a result with an exception set

Post by davecoventry »

Since upgrading my system KDE Neon from 20.04 to 22.04 my FreeCAD has been almost unusable.

I presume this is due to the perennial issue of incompatibility between versions of Python.

Here are my errors:

Code: Select all

<built-in function SoFieldContainer_getField> returned a result with an exception set
Traceback (most recent call last):
  File "<string>", line 152, in Activated
  File "/opt/freecad-source/freecad-build/Mod/Draft/draftguitools/gui_snapper.py", line 1578, in show
    self.setTrackers()
  File "/opt/freecad-source/freecad-build/Mod/Draft/draftguitools/gui_snapper.py", line 1622, in setTrackers
    self.grid = trackers.gridTracker()
  File "/opt/freecad-source/freecad-build/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)

Code: Select all


OS: KDE neon 5.26 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.31151 (Git)
Build type: Unknown
Branch: master
Hash: 1803cc0c7e9a9729002579890fe35c5373d3b451
Python 3.10.6, Qt 5.15.7, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.1
Locale: English/South Africa (en_ZA)
~ Dave
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: SoFieldContainer_getField> returned a result with an exception set

Post by looo »

pivy needs to be updated for python3.10. Best to make an issue for your system.
As a workaround you can download pivy, and replace the system pivy. (Only the coin.so is needed to be replaced IICRC)
https://anaconda.org/conda-forge/pivy/0 ... _2.tar.bz2

pivy should be placed in /usr/lib/python3.10/site-packages/pivy (or similar)
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: SoFieldContainer_getField> returned a result with an exception set

Post by davecoventry »

Thanks for the assistance.

However, I can no longer get the Draft Workbench, which includes the Entity Snapping.

I have installed pivy in /opt/pivy-0.6.8

I have then linked to that directory:

Code: Select all

ln -s /opt/pivy-0.6.8 /usr/lib/python3/pivy
ln -s /opt/pivy-0.6.8 /usr/lib/python3.11/pivy
ln -s /opt/pivy-0.6.8 /usr/lib/python3.10/pivy
ln -s /opt/pivy-0.6.8 /usr/lib/python2.7/pivy
I get:
Error: Unknown error while trying to load Pivy.
~ Dave
User avatar
dpward
Posts: 27
Joined: Sun Jan 01, 2023 6:06 pm
Contact:

Re: SoFieldContainer_getField> returned a result with an exception set

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