Chamfer requires that edges be selected
The chamfer edge selection is empty. A selector for circular edges on a box finds no edges, so CadQuery refuses to chamfer.
Workplane.chamfer did not receive any Edge objects from the current selection. It stops before constructing the chamfer.
The selector does not match the current topology, or a previous operation changed or removed the edges it was meant to select. In this example, a plain box has straight edges, so %CIRCLE returns an empty selection. An earlier selection must not be assumed to describe the result of a later Boolean cut.
import cadquery as cad
result = cad.Workplane("XY").box(10,10,4).edges("%CIRCLE").chamfer(0.5)
Select the intended edges on the current solid. For this box, the four vertical edges are the intended chamfer targets. Keep the 0.5 mm chamfer and check the selection before applying it.
```python
import cadquery as cad
body = cad.Workplane("XY").box(10,10,4)
edges = body.edges("|Z")
assert edges.size() == 4
result = edges.chamfer(0.5)
```