The offending code is Mod/Draft/draftguitools/gui_trackers.py around Line 976
Code: Select all
class gridTracker(Tracker):
"""A grid tracker."""
def __init__(self):
gtrans = Draft.getParam("gridTransparency",0)
col = self.getGridColor()
if Draft.getParam("coloredGridAxes",True):
red = ((1.0+col[0])/2,0.0,0.0)
green = (0.0,(1.0+col[1])/2,0.0)
blue = (0.0,0.0,(1.0+col[2])/2)
else:
red = col
green = col
blue = col
pick = coin.SoPickStyle()
pick.style.setValue(coin.SoPickStyle.UNPICKABLE) <--------------here!
Code: Select all
13:18:21 <built-in function SoFieldContainer_getField> returned a result with an exception set
13:18:21 Traceback (most recent call last):
File "<string>", line 152, in Activated
File "/home/chris/github/freecad-source/build/Mod/Draft/draftguitools/gui_snapper.py", line 1578, in show
self.setTrackers()
File "/home/chris/github/freecad-source/build/Mod/Draft/draftguitools/gui_snapper.py", line 1622, in setTrackers
self.grid = trackers.gridTracker()
File "/home/chris/github/freecad-source/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)
I compile freecad myself from the latest pull, and this issue has cropped up in the last month or so, (I rarely use Draft so perhaps longer). I might have messed things up by trying to compile realthunder's version which uses his own version of coin.
However, reinstalling coin and pivy from the default OS distub to overwrite my attempt has not changed anything. (so I'm confused)
I tried a git bisect but could not find a clean build from last summer, (still confused)
I tried a little test in python with the code causing the error. (taken from freecad-source/build/Mod/Draft/draftguitools/gui_trackers.py", line 972) and was able to recreate the error.
Code: Select all
python
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pivy.coin as coin
>>> pick = coin.SoPickStyle()
>>> coin.SoPickStyle.UNPICKABLE
2
>>> pick.style.setValue(coin.SoPickStyle.UNPICKABLE)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pivy/coin.py", line 3983, in __getattr__
return SoBase.__getattribute__(self, name)
AttributeError: 'SoPickStyle' object has no attribute 'style'
During handling of the above exception, another exception occurred:
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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)
SystemError: <built-in function SoFieldContainer_getField> returned a result with an exception set
Any ideas?
Code: Select all
OS: Linux Mint 21 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31569 (Git)
Build type: Unknown
Branch: master
Hash: 3388854cbc63936071e8ec7021db30ce51eeb367
Python 3.10.6, Qt 5.15.3, Coin 4.0.1, Vtk 9.1.0, OCC 7.5.1
Locale: English/Canada (en_CA)
Installed mods:
* Plot 1.0.4
* dummy.py
* BOLTSFC
* BIM 2021.12.0
* CycloidGearBox
* gbNov8.stl
* workfeature
* fcgear 1.0.0
* parts_library
* FreeCAD_assembly3 0.11.2
* cycdisk.stl
* CurvedShapes 1.0.4
* Manipulator 1.4.9
* gbNov8.FCStd
* SelectorToolbar
* EM
* Assembly4 1.0.4
* ThreadProfile 0.12.5
* sheetmetal 0.2.60
* pindisk.stl
* testdisk.log
* 3D_Printing_Tools
* es.stl
* kicadStepUpMod 10.16.8
* ose-workbench-core
* ExplodedAssembly
* FCGear 1.0.0
* OSE3dPrinter
* RemBench
* retr3d
* A2plus 0.4.60h
* LCInterlocking
* Mechatronic
* Design456 0.0.1
* PieMenu
* drivdisk.stl
* Mechatronic1
* symbols_library
* Help 1.0.3
* FeedsAndSpeeds 0.5.0
* Pyramids-and-Polyhedrons
* workfeature-macro
* ose-piping-workbench
* Nikra-DAP
* fasteners 0.4.53
* Lattice2 1.0.0