Cannot provision SSL Certificates

Hi, I’m having some SSL certificate problems.
For a while now, one of my sub domains had a valid certificate, but MIAB wasn’t serving it, instead using an old one, and in addition the status page would always produce a Something Went Wrong dialog. To try and fix these issues, having rerun sudo mailinabox without success, I created a clean VPS, installed MIAB and restored my backups onto it. Now I can’t provision certificates at all. The SLL Certificates page gives a ‘something went wrong error’, and deleting the contents of /home/user-data/ssl and running mailinabox followed by managment/ssl_certificates.py resulting in the following:

Traceback (most recent call last):
  File "./ssl_certificates.py", line 660, in <module>
    provision_certificates_cmdline()
  File "./ssl_certificates.py", line 372, in provision_certificates_cmdline
    status = provision_certificates(env, limit_domains=domains)
  File "./ssl_certificates.py", line 348, in provision_certificates
    ret.extend(post_install_func(env))
  File "./ssl_certificates.py", line 476, in post_install_func
    ret.append( do_web_update(env) )
  File "/root/mailinabox/management/web_update.py", line 84, in do_web_update
    nginx_conf += make_domain_config(env['PRIMARY_HOSTNAME'], [template0, template1, template2], ssl_certificates, env)
  File "/root/mailinabox/management/web_update.py", line 153, in make_domain_config
    if domain in yaml:
TypeError: argument of type 'NoneType' is not iterable

I’m stumped, can anyone help?

This was caused by an empty custom.yaml file in user-data/www. Deleting it solved the problem.