AttributeError: ‘Namespace’ object has no attribute

You’re parsing command line arguments into args, which is a Namespace with attributes set to the parsed arguments. But you’re passing this entire namespace to downloadData, rather than just the url. This namespace is then passed to urlopen, which doesn’t know what to do with it. Instead, call downloadData(args.url).

Leave a Comment