Storage.py NoneType found

Hello!

Yesterday I got my Letsencrypt Beta Invite and tried it out immediately. First problem was, I got a DNS error “no MX entry found” for my email address, so I used a different one. Than all went well, and I’m using the certs in postfix and dovecot as well. Today I wanted to change the email address, because I have added the mx entry. I found the JSON-Files in the accounts-directory and changed the email. After a renewal I got the certs, but in a directory -001. So I deleted the whole accounts directory, and now letsencrypt fails with the following error:

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 1131, in main
return args.func(args, config, plugins)
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 489, 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 309, 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 229, in _treat_as_renewal
config, domains)
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 203, 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

Hi @Billie, you’ve clearly found a bug! (Embarrassingly, it’s quite possible that the bug is in code that I wrote myself, judging from that Python error traceback you posted…)

Thanks for letting us know – this kind of thing is exactly why we need beta testers like you! I’ll file a note about it in our bug tracker on GitHub, and hopefully I or someone else will get back to you with advice about what you can personally do to deal with this situation.

At a high level I don’t think we’ve thought through how to handle changing an e-mail address. Deleting the accounts directory on your server is clearly not the way that our software expected you to handle this :slight_smile: but it ought to handle this more gracefully by explaining what went wrong and offering a way to recover, rather than just crashing.

1 Like

@Billie, I filed two bugs in our client bug tracker related to this:


You can see the status of this issue there and hopefully someone will also get back to you about what you can do in your specific situation.

1 Like