Search code examples
pythonpython-3.6urllib3

python urllib certificate verify failed


I have the follwing script:

from currency_converter import CurrencyConverter

test = CurrencyConverter('http://www.ecb.europa.eu/stats/eurofxref/eurofxref.zip')

I try to run it on machine with windows 10 and python 3.6.7 and always get this error:

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

Running it on other windows 10 machines with python 3.6 works fine. I tried it on this machine with python 3.7 and get the same error. What could be wrong with the python installation ?


Solution

  • The reason it worked on MS Edge and not in Brave is because Brave doesn't have root ca added in trusted certificates. You need to add your ROOT_CA certificate in brave browser.