File "_convenience_mapping.py", line 18, in __getitem__objectForKey_

I have this script that stopped working recently.

and I get this error:

Traceback (most recent call last):
  File "Show Kerning Pairs.py", line 69
    for L in thisFont.kerning[ masterID ].keys():
  File "_convenience_mapping.py", line 18, in __getitem__objectForKey_
    return container_unwrap(res, KeyError, key)
  File "_convenience.py", line 113, in container_unwrap
    raise exc_type(*exc_args)
KeyError: 'm01'

It seems that the font has no kerning for that master.