katholt / srst2

Short Read Sequence Typing for Bacterial Pathogens
Other
123 stars 65 forks source link

urllib2.URLError: #138

Open jvhagey opened 2 years ago

jvhagey commented 2 years ago

Hi,

I am running srst2 v0.2.0 in a conda environment and when I run getmlst.py --species "Escherichia coli#1" got the following error:

urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

I found this error in the quay.io containers v0.2.0 I tried as well.

This can be fixed by adding:

import ssl to line27 and changing the following at line197:

if __name__ == '__main__':
    ssl._create_default_https_context = ssl._create_unverified_contex
    main()

Not sure why this is happening, but hopefully someone else finds it helpful.