Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Conversation

lnobach
Copy link

@lnobach lnobach commented Jun 30, 2020

Hi,

I am maintaining https://github.com/lnobach/nctalk-backend-cloud-config and I liked nginx-certbot, so I used it in the docker-compose.

Today I stumbled over the following error while creating an instance:

proxy_1          | running certbot ... https://acme-v02.api.letsencrypt.org/directory [...] [...]
proxy_1          | Traceback (most recent call last):
proxy_1          |   File "/usr/local/bin/certbot", line 5, in <module>
proxy_1          |     from certbot.main import main
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/certbot/main.py", line 2, in <module>
proxy_1          |     from certbot._internal import main as internal_main
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/main.py", line 21, in <module>
proxy_1          |     from certbot._internal import cert_manager
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/cert_manager.py", line 16, in <module>
proxy_1          |     from certbot._internal import storage
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/storage.py", line 79, in <module>
proxy_1          |     def add_time_interval(base_time, interval, textparser=parsedatetime.Calendar()):
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/parsedatetime/__init__.py", line 270, in __init__
proxy_1          |     self.ptc = Constants()
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/parsedatetime/__init__.py", line 2381, in __init__
proxy_1          |     self.locale = get_icu(self.localeID)
proxy_1          |   File "/usr/local/lib/python2.7/dist-packages/parsedatetime/pdt_locales/icu.py", line 56, in get_icu
proxy_1          |     result['icu'] = icu = pyicu.Locale(locale)
proxy_1          | AttributeError: 'module' object has no attribute 'Locale'
proxy_1          | + error 'Cerbot failed for [...]. Check the logs for details.'

Got it fixed with switching to Python 3.7 (Python 2 is deprecated). The proposed change works fine on my infrastructure, but please confirm that it works for you as well.

I have a Docker Hub autobuild available: lnobach/nginx-certbot

@joeldentici
Copy link

I'm using this as well currently and facing the same issue. I second the need for this. I've made this change for many Dockerfiles over the last few months that were targeting latest-tag base images.

@staticfloat staticfloat merged commit 238b69f into staticfloat:master Jul 1, 2020
@staticfloat
Copy link
Owner

I ran into this just today myself! Great timing. :)

staticfloat pushed a commit that referenced this pull request Jun 23, 2022
…nx-1.19.8

Bump nginx from 1.19.7 to 1.19.8
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants