answered 2015-10-01 18:43:26 +0100
The error is that D is a tuple, and not a group. Read the documentation of direct_product, by typing
sage: G.direct_product?