This is good troubleshooting so far, although things are still puzzling. The problem is, the code you posted above shouldn't get executed if a valid key press has been made. i.e. if either z or m was pressed, then by definition
key_resp_8.keys is not in ['', , None]
You should be able to verify this by inserting a print statement within that check, e.g.
if key_resp_8.keys in ['', , None]: # No response was made
print('no key was pressed')
# was no response the correct answer?!
if str(correctAns).lower() == 'none':
key_resp_8.corr = 1 # correct non-response
key_resp_8.corr = 0
Re-insert your other print statement near line 1082. One, and only one, of those statements should be printed on every trial. Hopefully that will help you narrow things down further.