answered 9 years ago
The error is that D is a tuple, and not a group. Read the documentation of direct_product, by typing
sage: G.direct_product?