Install from port works fine, but if i run certbot this error occurs: An unexpected error occurred: AttributeError: 'tuple' object has no attribute 'add' Please see the logfile 'certbot.log' for more details. pip check -> everything ok Installed Pythons: Python 2.7.13 (default, May 12 2017, 22:07:08) Python 3.6.1 (default, May 14 2017, 11:26:05)
# cat certbot.log Traceback (most recent call last): File "/usr/local/bin/certbot", line 11, in <module> load_entry_point('certbot==0.13.0', 'console_scripts', 'certbot')() File "/usr/local/lib/python2.7/site-packages/certbot/main.py", line 738, in main args = cli.prepare_and_parse_args(plugins, cli_args) File "/usr/local/lib/python2.7/site-packages/certbot/cli.py", line 1072, in prepare_and_parse_args helpful.add_deprecated_argument("--agree-dev-preview", 0) File "/usr/local/lib/python2.7/site-packages/certbot/cli.py", line 726, in add_deprecated_argument self.parser.add_argument, argument_name, num_args) File "/usr/local/lib/python2.7/site-packages/certbot/util.py", line 440, in add_deprecated_argument configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning) AttributeError: 'tuple' object has no attribute 'add' I'm sorry for adding this information late
Done some search and i think, i could have something todo with this update: py27-configargparse-0.11.0 to py27-configargparse-0.12.0
ports r440849 updated configargparse to 0.12 which appears to cause this issue. CC'ing committer of that change (sunpoet) and py-acme maintainer (cpm)
Add upstream issue link
Commit potentially (unverified) fixing issue: https://github.com/certbot/certbot/commit/de1dbb745fd5baec304c59a6a68f794515f7c7e5
(In reply to Kubilay Kocak from comment #5) I think it's the solution. Thanks! I removed the flag because there's nothing to do in configargparse part.
Created attachment 182620 [details] patch Add support version 0.12.0 of configargparse
@Carlos Thank you for your patch. Can you please: 1) Add the PR metadata to the header of the patch as a comment (add .patch to pull request URL to see commit metadata): Pull Request: https://github.com/certbot/certbot/pull/4650 Issue: From 42d07d756df0cf96c9d20b44e772858391d48384 Mon Sep 17 00:00:00 2001 From: Ryan Pineo <ry@tsl.io> Date: Fri, 12 May 2017 15:45:54 -0400 Subject: [PATCH] support version 0.12.0 of configargparse fixes #4648 2) Confirm the change passes QA
Created attachment 182625 [details] patch - Add the PR metadata to the header of the patches as a comment.
portlint: OK (looks fine.) testport: OK (poudriere: 103i386, 103amd64, 110i386, 110amd64, 120i386 and 120amd64.) unittest: OK (609 tests in 15.967s)
security/py-acme needs bump PORTREVISION
This is supposedly fixed in Certbot 0.14.1: https://github.com/certbot/certbot/blob/master/CHANGELOG.md https://github.com/certbot/certbot/issues/4662#issuecomment-301627229
(In reply to SBB from comment #12) I have a patch to update py-{acme,certbot} to 0.14.1 release in Phabricator https://reviews.freebsd.org/D10612
Comment on attachment 182625 [details] patch Approved, don't forget missing PORTREVISION for py-acme (not included in patch)
Thanks, I tested the patches and they fixed the problem.
A commit references this bug: Author: cpm Date: Sat May 20 20:44:13 UTC 2017 New revision: 441335 URL: https://svnweb.freebsd.org/changeset/ports/441335 Log: security/py-certbot: Fix configargparse 0.12.0 regression This is caused by the recent release of configargparse version 0.12.0. The variable ACTION_TYPES_THAT_DONT_NEED_A_VALUE was changed from a set to a tuple in that release. Traceback (most recent call last): File "/usr/local/bin/certbot", line 11, in <module> load_entry_point('certbot==0.13.0', 'console_scripts', 'certbot')() File "/usr/local/lib/python2.7/site-packages/certbot/main.py", line 738, in main args = cli.prepare_and_parse_args(plugins, cli_args) File "/usr/local/lib/python2.7/site-packages/certbot/cli.py", line 1072, in prepare_and_parse_args helpful.add_deprecated_argument("--agree-dev-preview", 0) File "/usr/local/lib/python2.7/site-packages/certbot/cli.py", line 726, in add_deprecated_argument self.parser.add_argument, argument_name, num_args) File "/usr/local/lib/python2.7/site-packages/certbot/util.py", line 440, in add_deprecated_argument configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning) AttributeError: 'tuple' object has no attribute 'add' PR: 219306 Reported by: GKK <netbackup.gs@gmail.com> Approved by: koobs (maintainer) Obtained from: https://github.com/certbot/certbot/commit/42d07d756df0cf96c9d20b44e772858391d48384 Changes: head/security/py-certbot/Makefile head/security/py-certbot/files/patch-certbot_tests_util__test.py head/security/py-certbot/files/patch-certbot_util.py
Committed! Thanks