No module named 'pyasn1'

Today i run apt autoremove and now the following errors happened when i run certbot:

/usr/lib/python3/dist-packages/ndg/httpsclient/subj_alt_name.py:22: UserWarning: Error importing pyasn1, subjectAltName check for SSL peer verification will be disabled.  Import error is: No module named 'pyasn1'
  warnings.warn(import_error_msg)
/usr/lib/python3/dist-packages/ndg/httpsclient/ssl_peer_verification.py:25: UserWarning: SubjectAltName support is disabled - check pyasn1 package installation to enable
  warnings.warn(SUBJ_ALT_NAME_SUPPORT_MSG)
/usr/lib/python3/dist-packages/ndg/httpsclient/subj_alt_name.py:22: UserWarning: Error importing pyasn1, subjectAltName check for SSL peer verification will be disabled.  Import error is: No module named 'pyasn1'
  warnings.warn(import_error_msg)

Tried to reinstall pyasn1, but still theres an error.

Hi,

Can you fill this form so we can help you better? (Since we have no clue what's your domain name or system version)

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

Thank you

Domain: serke.org

I ran this command: sudo apt autoremove and it removed certbot, then i reinstalled it.

Web server is: nginx/1.10.3 (Ubuntu)

OS: Ubuntu 16.04

Dedicated server

I have SSH access

Not using control panel

As your Certbot is being run with Python 3, you should probably check to ensure that you have the python3-pyasn1 package installed.

python-pyasn1 is already the newest version (0.1.9-2+certbot~xenial+1).

python-pyasn1 and python3-pyasn1 are two separate packages. The former is for Python 2, the latter is for Python 3.

3 Likes

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