Change tile grid shape
Is a property of the UV editor space of the Image editor space.
Same deal as How to change View3DOverlay.show_stats?
The property is a member of the UV editor space. https://docs.blender.org/api/current/bpy.types.SpaceUVEditor.html#bpy.types.SpaceUVEditor.tile_grid_shape
following references will see that the UV editor is available from the Image editor
bpy.types.SpaceImageEditor.uv_editor

Test in python console.
&gt;&gt;&gt; for i, a in enumerate(C.screen.areas):
...     i, a.type
...     
(0, 'PROPERTIES')
(1, 'OUTLINER')
(2, 'IMAGE_EDITOR')
(3, 'VIEW_3D')
(4, 'CONSOLE')

&gt;&gt;&gt; space = C.screen.areas[2].spaces.active
&gt;&gt;&gt; space
bpy.data.screens['UV Editing']...SpaceImageEditor

&gt;&gt;&gt; space.uv_editor
bpy.data.screens['UV Editing'].uv_editor
# Wrongly represents itself.

&gt;&gt;&gt; type(space.uv_editor)
&lt;class 'bpy.types.SpaceUVEditor'&gt;

&gt;&gt;&gt; space.uv_editor.tile_grid_shape[:]
(1, 1)

&gt;&gt;&gt; space.uv_editor.tile_grid_shape = (2, 1)

Re error area.type is a string (see line above) and has no tile_grid_shape property.