# Storage.py NoneType found

**URL:** <https://community.letsencrypt.org/t/storage-py-nonetype-found/2529>\
**Category:** Uncategorized\
**Created:** [October 30, 2015, 5:57pm UTC](https://community.letsencrypt.org/t/storage-py-nonetype-found/2529 "2015-10-30T17:57:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billie](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Billie](https://community.letsencrypt.org/u/Billie)\
**Post date:** [October 30, 2015, 5:57pm UTC](https://community.letsencrypt.org/t/storage-py-nonetype-found/2529/1 "2015-10-30T17:57:34Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [October 30, 2015, 6:12pm UTC](https://community.letsencrypt.org/t/storage-py-nonetype-found/2529/2 "2015-10-30T18:12:16Z")

</div>

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 🙂 but it ought to handle this more gracefully by explaining what went wrong and offering a way to recover, rather than just crashing.

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [October 30, 2015, 6:19pm UTC](https://community.letsencrypt.org/t/storage-py-nonetype-found/2529/3 "2015-10-30T18:19:35Z")

</div>

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

> <https://github.com/certbot/certbot/issues/1214>

  

> <https://github.com/certbot/certbot/issues/1215>

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.
