I'm attempting to do an esearch of the BioPython database using Django 2.1 and Python 3.7 but I seem to be getting an odd SSL Error I never got with earlier versions of Python/Django (i'm on a Mac)
I've install certifi but nothing seems to have happened.
def results(request):
disease = request.GET.get('disease_name')
year_beginning = request.GET.get('year_beginning')
year_ending = request.GET.get('year_ending')
Entrez.email = "test@gmail.com"
handle = Entrez.esearch(
db="pubmed",
sort="relevance",
term=disease,
mindate=year_beginning,
maxdate=year_ending,
retmode="xml",
)
results = Entrez.read(handle, validate="False")
handle.close()
print(results)
context = {
'results': results,
}
return render(request, 'lm_test/results.html', context)
This should return results similar to https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmode=xml&retmax=20&sort=relevance&term=fever but I just seem to be constantly getting an ssl error in my local host?
Error is: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)