CW1173, ERROR:root:Target did not ack

The serial link’s baud rate is tied to the clock, so if you change the clock, you also have to scale the baud rate accordingly. The baud rate for the default 7.37 MHz clock is 38400; set it to match your clock with:
target.baud = X

Jean-Pierre