Abaqus - KeyError, Datum reference error. Abaqus Script

Preparing a code to do a parametric analysis. When I do the modelling in abaqus cae, while creating datum/reference axis/point, it uses a random number (as I don't know it, calling it random). When I further copy and paste that code through "run script", I always end up with KeyError. Any suggestions/references to work with datum plane, point? - Sriram

Abaqus ​​​​​​​