Namespace object has no attribute 'copy'