CAM stock positioning: 'NoneType' object has no attribute 'Group'
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 196
Description
### Problem description
```
'NoneType' object has no attribute 'Group'
AttributeError
^ (20 times)
for base in self.obj.Model.Group:
File "/Applications/FreeCAD.app/Contents/Resources/Mod/CAM/Path/Main/Gui/Job.py", line 1475, in togglePickTarget
Traceback (most recent call last):
```
### Workbench affected?
CAM
### Steps to reproduce
I'm not sure exactly when this happens, but I've been playing with the buttons in "Alignment" for a bit trying to figure it out, and at some point deselected my model and hit the "Picking:" button. Now pressing it throws the error.
### Expected behavior
No error
### Actual behavior
Cannot select model or stock.
https://github.com/user-attachments/assets/a6fa4e86-0abf-4802-a2e4-37ab4f3fb12c
### Development version About Info (in Safe Mode)
```shell
OS: macOS 26.5.2
Architecture: arm64
Version: 26.3.0dev.20260709 (Git shallow)
Build date: 2026/07/09 17:16:11
Build type: Release
Branch: (HEAD detached at c298f781c)
Hash: c298f781cf3ecac5d6e17e8a912b97e0e84df501
Python 3.11.14, Qt 6.8.3, Coin 4.0.10 (bundled), Pivy 0.6.11 (bundled), Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.3.0, Clipper2 , IfcOpenShell 0.8.2, OCC 7.8.1
Locale: English/Switzerland (en_CH)
Stylesheet/Theme/QtStyle: FreeCAD.qss/FreeCAD Light/
Navigation Style/Orbit Style/Rotation Mode: Touchpad/Rounded Arcball/Window center
Logical DPI/Physical DPI/Pixel Ratio: 72/127.5/2
```
### Last known good version (optional)
```shell
N/A
```
Contributor guide
Research direction
Start in Mod/CAM/Path/Main/Gui/Job.py at togglePickTarget, especially the reported line 1475, and reproduce the sequence of deselecting the model and pressing the Picking control in the Alignment UI. Trace why self.obj or its Model lacks Group in that state. Done means the Picking control no longer raises AttributeError and model or stock selection remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100