nigyta / dfast_core

DDBJ Fast Annotation and Submission Tool
76 stars 14 forks source link

Error during reference download #15

Closed gdefazio closed 5 years ago

gdefazio commented 5 years ago

I launch the following command file_downloader.py --protein dfast but the script returns the following errors: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)> Please, help me to solve this problem.

nigyta commented 5 years ago

Dear @gdefazio,

Thank you trying DFAST and reporting the error.

Unfortunately, I was not able to reproduce it in my environment. Are you using MacOS and Python3.6? As far as I found out, this might be a specific issue on that environment.

Although I haven't checked, the following may help.

  1. Open file_downloader.py with a text editor
  2. Insert the following two lines into the 3rd line of the script.
    import ssl
    ssl._create_default_https_context = ssl._create_unverified_context
  3. Then try again file_downloader.py --protein dfast

If it doesn't work, please let me know again. I will tell you how to set up the reference database manually.

Searching google with following keywords may help too. python macos urllib CERTIFICATE_VERIFY_FAILED https://stackoverflow.com/questions/35569042/ssl-certificate-verify-failed-with-python3

gdefazio commented 5 years ago

Thank you. The reference download is done. I'm using CentOS server and python 3.7.

nigyta commented 5 years ago

Thank you for letting me know. I'm going to check if it works on a CentOS machine.