Why is the underlying command of "select all" not working when executed with python? (Grease Pencil)
To do with API methods
As commented, the code used looks like it &quot;should&quot; work. Have answered showing a low level alternative to move the gp data points.
Move all points of all strokes of all frames of all layers of the gp object's data.
Narrow down using active frame or layer if required.
import bpy
from mathutils import Vector
from bpy import context

ob = context.object

gp = ob.data
active_layer = gp.layers.active
active_frame = active_layer.active_frame
for layer in gp.layers:
    for frame in layer.frames:
        for stroke in frame.strokes:
            for p in stroke.points:
                p.co += Vector((0.5, 0, 0))

Selecting via operator appears to need 3D view area for context.
Can select all the gp data via operator, by overriding the context to include the 3D view area, eg
import bpy

# assume is in EDIT mode
for a in bpy.context.screen.areas:
    if a.type == 'VIEW_3D':

        # select all vertices (doesn't work)
        bpy.ops.gpencil.select_all(action=&quot;SELECT&quot;)
        # run in 3d area or override context to &quot;pretend&quot; in 3d area works.
        bpy.ops.gpencil.select_all({&quot;area&quot; : a}, action=&quot;SELECT&quot;)
        break

However the transform translate operator, on attempts so far,  always returns cancelled. Any attempt to override causes death to blender.