One more attempt to fix errors in python code.