Potential Issue with New Certbot and Argparse - AttributeError: 'tuple' object has no attribute 'add'

Hi All

If you are seeing a issue around AttributeError: ‘tuple’ object has no attribute ‘add’ when running certbot it a known one.

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.

I believe a fix is in the works.


1 Like

Workarounds are below

**NOTE: It is your responsibility to test these in a virtualenv before trying them in production (**no apologies if your production system breaks)

A) Downgrade to an older version of ConfigArgParse

pip install configargparse==0.11.0

Install of Certbot 0.13.0 - Locks in 0.14.0 prevent me from testing on this version



Working Environment:

1 Like

Work around 2:

NOTE: It is your responsibility to test these in a virtualenv before trying them in production (no apologies if your production system breaks)

More information: https://github.com/certbot/certbot/issues/4659

Install Cerbot 0.13.0 As Per Usual

Error Encountered

Update Code:

Update Util.py in python certbot path

Note: you will need to figure this out in you virtual environment but usually python home\Lib\site-packages\certbot**



configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE += (ShowWarning,)

Note: only one update is needed and depending on what version of Certbot it may be further up or further down (line numbers)



1 Like

I’ve run into this on renewal, but I have a couple of weeks before the certs expire. I would prefer to not to do the workaround if a fix is coming. Will there be a fix soon? Is the smart thing for me to just wait a couple of days?


I’ve pulled the latest changes from github but I still have this issue. Am I missing something?

check the util.py on github

This is intended to fix installs that are broken by the update (not sure how the fix is coming along)

https://github.com/certbot/certbot/issues/4648 was the original report

It’s merged in master in https://github.com/certbot/certbot/pull/4650
So I assumed it would work, but clearly I am missing something

Fwiw the downgrade to configparser 0.11.0 fixed the issue on one of my affected systems that is running certbot 0.14.0.

To answer my own question, yes, I tried again today and the renewals went flawlessly.

1 Like

I did this workaround fix on FreeBSD and certbot back to normal. Waiting for official fix, but till then I’m fine :slight_smile: Thankk you @ahaw021.

hi @lidow

This has been fixed with Certbot 0.14.1 :smiley:


@ahaw021, yes I read somewhere, but still waiting it for FreeBSD. Current version for FreeBSD is 0.13.0 https://www.freshports.org/security/py-certbot.

ah ok

you can try with pip instead of waiting for OS package

pip install certbot --upgrade

Yours will look different as you are using BSD and I am using Windows


It is ok to stay like this, your workaround is fine for me. This is small router that I try to manage just with binary packages from FreeBSD repo. Mixing different update technics, will make my life harder in supporting it in future.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.