It will create a models directory in current folder if it can't find the directory due to previous way where it tries to return models directory where its not present which in turns returns None causing os.path to fail Fix #2030