The error message is from scatter_2d
“There are multiple child meshes (or perhaps other non-mesh types) for the parent xform, scatter requires a single child at this level of hierarchy.”
This is either an issue with the way your prims are structured in Usd, or your get.prims is “too broad” and is getting prims that are not compatible with scatter_2d.
Try to print which prims are being returned by your get.prims and also take a look at the documentation for get.
There are specific methods such as get.xform or get.mesh, or use the prim_types argument with get.prims to restrict the results to prims that can be scattered with scatter_2d