Python Error..?


#1

Hi,

I wanted to bring you to the attention of this error:

chris@vps87212115:~/letsencrypt$ ./letsencrypt-auto --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory certonly -d cmellor.uk --apache
Updating letsencrypt and virtual environment dependencies......
Running with virtualenv: sudo /home/chris/.local/share/letsencrypt/bin/letsencrypt --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory certonly -d cmellor.uk --apache
An unexpected error occurred.
TypeError: coercing to Unicode: need string or buffer, NoneType found
Please see the logfiles in /var/log/letsencrypt for more details.

I don’t know Python, but from some Googling it seems related to that.

I’m working on Ubuntu 14+ FYI.


#2

Hi all,

It seems that I have the same issue @ ubuntu 14.04 (Linux monitoring 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux)

The log says:

2015-11-04 11:43:20,174:DEBUG:letsencrypt.cli:Exiting abnormally:
Traceback (most recent call last):
File “/root/.local/share/letsencrypt/bin/letsencrypt”, line 11, in
sys.exit(main())
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 1138, in main
return args.func(args, config, plugins)
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 490, in obtaincert
_auth_from_domains(le_client, config, domains, plugins)
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 310, in _auth_from_domains
lineage = _treat_as_renewal(config, domains)
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 230, in _treat_as_renewal
config, domains)
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 204, in _find_duplicative_certs
candidate_names = set(candidate_lineage.names())
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/storage.py”, line 438, in names
with open(target) as f:
TypeError: coercing to Unicode: need string or buffer, NoneType found

I used a single domain name in the box. Any clue?

Tegards,

Piotr.


#3

OK… Seems that I found solution.

rm -rf /etc/letsencrypt
cd
rm -rf .local/share/letsencrypt/
rm -rf letsencrypt/
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory auth

And … success!

I hope it’ll help you too.

Regards,
Piotr.


#4

rm all and do git again so now :

File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: /root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: EC_curve_nid2nist

#5

This seems to me to be an openssl issue.
Could you give the output of:

openssl version

I have OpenSSL 1.0.1f 6 Jan 2014

Thanks,

Piotr.


#6

Try upgrading OpenSSL, my version OpenSSL
1.0.1p-freebsd OpenSSL 9 Jul 2015
Be able to work properly


#7

LibreSSL 2.3.1
released November 2, 2015
(cause want test chacha20)
edit same error on OpenSSL 1.0.2d 9 Jul 2015


#8

urrently it does not seem to support LibreSSL


#9

No problems here with Nginx compiled against LibreSSL for chacha20 Letsencrypt Webroot Authentication Tested on Beta invited/whitelisted domain :slight_smile:


#10

zazak’s solution worked for me!!! :slightly_smiling: