Motor error upon restart after calibration sequence

Dual motor setup. both motors are GB54-2 gimbal type both using AMT10E2-v encoders. The calibration sequence seems to work fine and reports no errors. However, once all is saved and the reboot is done after saving, i get the following errors only on one motor.

This is my script im running to set all config

import odrive
import time
from sys import stderr
from odrive.enums import MotorType, ControlMode, InputMode, AxisState
from odrive.utils import dump_errors

print(“beep”)
odrv0 = odrive.find_any(timeout=5)
odrv0.clear_errors()

print(“boop”)

set motor & encoder config

odrv0.config.enable_brake_resistor = True
odrv0.config.brake_resistance = 2
odrv0.config.dc_max_negative_current = -0.1

for id, axis in zip(range(0, 2), (odrv0.axis0, odrv0.axis1)):
print(f"calibrating axis {id}")
axis.motor.config.current_lim = 10
axis.motor.config.motor_type = MotorType.GIMBAL
axis.motor.config.pole_pairs = 7
axis.motor.config.torque_constant = 8.27 / 26.0
axis.motor.config.current_control_bandwidth = 2000.0
# test
axis.motor.config.resistance_calib_max_voltage = 4

axis.encoder.config.cpr = 20480
axis.encoder.config.use_index = True
axis.controller.config.vel_limit = 100
axis.controller.config.vel_limit_tolerance = 0.1
axis.controller.config.input_filter_bandwidth = 2.0
axis.controller.config.input_mode = InputMode.POS_FILTER
time.sleep(0.2)



# calibrate
axis.requested_state = AxisState.FULL_CALIBRATION_SEQUENCE
time.sleep(15)
while axis.current_state == AxisState.FULL_CALIBRATION_SEQUENCE:
    time.sleep(0.2)

print(f"current state: {odrv0.axis1.current_state}")
if odrv0.axis0.error or odrv0.axis0.motor.error:
    dump_errors(odrv0)
    print("Calibration failed", file=stderr)
    exit(1)

dump_errors(odrv0)

# tune settings for closed-loop control
axis.controller.config.vel_gain = 3
axis.controller.config.vel_integrator_gain = 0
axis.controller.config.pos_gain = 40.0

# start with velocity control, but not moving
axis.controller.input_vel = 0
axis.controller.config.control_mode = ControlMode.VELOCITY_CONTROL

axis.requested_state = AxisState.CLOSED_LOOP_CONTROL
if axis.error or axis.motor.error:
    dump_errors(odrv0)
    print("Closed loop control failed", file=stderr)
    exit(1)
dump_errors(odrv0)

axis.requested_state = AxisState.IDLE

# save calibration settings
axis.encoder.config.pre_calibrated=True
axis.motor.config.pre_calibrated=True
axis.config.startup_encoder_index_search = True
axis.config.startup_encoder_offset_calibration = False
axis.config.startup_closed_loop_control = True

time.sleep(0.2)

print(“Saving config”)
odrv0.save_configuration()

Is there any load on the encoder? Spinout can be caused by improper calibration. See Controller — ODrive Documentation 0.6.9 documentation