Extract the error calculation from the import.py script.