I even added this to user-config.py, but still got the same result.
def ignore_certificate_error(self, code):
return True
I think ignore_certificate_error should be defined inside the family file
and has no effect in user-config.py.
As a workaround you can modify the ignore_certificate_error in
pywikibot/family.py to make it return True. Then generate your family file
using the generator script (hopefully there won't be any error now).
After that you can revert the change in family.py and define
ignore_certificate_error
in the newly generated file.