why do you import the config object from motion.models and not from config.models? When the config is not needed any more in motion.models, it will be deleted from this module and this import will fail.