AttributeError: 'tuple' object has no attribute 'add'

问答中心分类: OneinStackAttributeError: 'tuple' object has no attribute 'add'
oneinstack 管理员 asked 2月 ago
2017-05-14 15:51:59,331:DEBUG:certbot.main:certbot version: 0.14.0
2017-05-14 15:51:59,331:DEBUG:certbot.main:Arguments: ['--renew-hook', '/etc/init.d/nginx reload']
2017-05-14 15:51:59,331:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2017-05-14 15:51:59,334:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
 File "/usr/local/python/bin/certbot", line 11, in <module>
 sys.exit(main())
 File "/usr/local/python/lib/python2.7/site-packages/certbot/main.py", line 729, in main
 args = cli.prepare_and_parse_args(plugins, cli_args)
 File "/usr/local/python/lib/python2.7/site-packages/certbot/cli.py", line 1089, in prepare_and_parse_args
 helpful.add_deprecated_argument("--agree-dev-preview", 0)
 File "/usr/local/python/lib/python2.7/site-packages/certbot/cli.py", line 741, in add_deprecated_argument
 self.parser.add_argument, argument_name, num_args)
 File "/usr/local/python/lib/python2.7/site-packages/certbot/util.py", line 479, in add_deprecated_argument
 configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning)
AttributeError: 'tuple' object has no attribute 'add'
1 Answers
oneinstack 管理员 answered 2月 ago

这个是官方一个bug,请执行如下命令:

sed -i 's@configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning)@#&@' /usr/local/python/lib/python2.7/site-packages/certbot/util.py