Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL: CERTIFICATE_VERIFY_FAILED when running run_windows.bat for the first time #432

Open
cabuckley88 opened this issue Oct 18, 2021 · 6 comments

Comments

@cabuckley88
Copy link

Describe the bug
After following all of the Windows 10 installation instructions I ran run_windows.bat and it came back with the following error: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>

To Reproduce
Follow the Windows installation instructions exactly as provided.

Info (please complete the following information):

  • OS (e.g., Linux): Windows 10 Pro
  • GPU model: Nvidia GTX 1650 Super
  • Any other relevant information:
    active environment : base
    active env location : C:\Users\user\miniconda3\envs\avatarify
            shell level : 2
       user config file : C:\Users\user\.condarc
 populated config files :
          conda version : 4.10.3
    conda-build version : 3.21.5
         python version : 3.7.10.final.0
       virtual packages : __cuda=11.5=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\user\miniconda3\envs\avatarify  (writable)
      conda av data dir : C:\Users\user\miniconda3\envs\avatarify\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\user\miniconda3\envs\avatarify\pkgs
                          C:\Users\user\.conda\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\user\miniconda3\envs\avatarify\envs
                          C:\Users\user\.conda\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.25.1 CPython/3.7.10 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False
# packages in environment at C:\Users\user\miniconda3\envs\avatarify:
#
# Name                    Version                   Build  Channel
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
beautifulsoup4            4.10.0             pyh06a4308_0
blas                      1.0                         mkl
blosc                     1.21.0               h0e60522_0    conda-forge
brotlipy                  0.7.0           py37hcc03f2d_1001    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.9.30            haa95532_1
certifi                   2021.10.8        py37haa95532_0
cffi                      1.14.6           py37hd8e9650_1    conda-forge
cfitsio                   3.470                h0af3d06_7    conda-forge
chardet                   4.0.0            py37h03978a9_1    conda-forge
charls                    2.2.0                h39d44d4_0    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4                    pypi_0    pypi
conda                     4.10.3           py37haa95532_0
conda-build               3.21.5           py37haa95532_0
conda-package-handling    1.7.3            py37h8cc25b3_1
cryptography              35.0.0           py37h20c650d_0    conda-forge
cudatoolkit               11.0.221             h74a9793_0
cycler                    0.10.0                     py_2    conda-forge
cytoolz                   0.11.0           py37hcc03f2d_3    conda-forge
dask-core                 2021.9.1           pyhd8ed1ab_0    conda-forge
decorator                 5.1.0              pyhd8ed1ab_0    conda-forge
face-alignment            1.3.3                    pypi_0    pypi
filelock                  3.0.12             pyhd3eb1b0_1
freetype                  2.10.4               h546665d_1    conda-forge
fsspec                    2021.10.1          pyhd8ed1ab_0    conda-forge
giflib                    5.2.1                h8d14728_2    conda-forge
git                       2.23.0               h6bb4b03_0    anaconda
glob2                     0.7                pyhd3eb1b0_0
idna                      2.10               pyh9f0ad1d_0    conda-forge
imageio                   2.9.0                      py_0    conda-forge
intel-openmp              2021.4.0          h57928b3_3556    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jinja2                    2.11.3             pyhd3eb1b0_0
jpeg                      9d                   h8ffe710_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
kiwisolver                1.3.2            py37h8c56517_0    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      3.0                  h0e60522_0    conda-forge
libaec                    1.0.6                h39d44d4_0    conda-forge
libarchive                3.4.2                h5e25573_0
libblas                   3.9.0              12_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_5    conda-forge
libbrotlidec              1.0.9                h8ffe710_5    conda-forge
libbrotlienc              1.0.9                h8ffe710_5    conda-forge
libcblas                  3.9.0              12_win64_mkl    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
libiconv                  1.15                 h1df5818_7
liblapack                 3.9.0              12_win64_mkl    conda-forge
liblief                   0.10.1               ha925a31_0
libpng                    1.6.37               h1d00b33_2    conda-forge
libtiff                   4.2.0                hd0e1b90_0
libuv                     1.40.0               he774522_0
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libxml2                   2.9.12               h0ad7f3c_0
libzlib                   1.2.11            h8ffe710_1013    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
llvmlite                  0.37.0                   pypi_0    pypi
locket                    0.2.0                      py_2    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                2.0.1            py37h2bbff1b_0
matplotlib-base           3.4.3            py37h4a79c79_1    conda-forge
menuinst                  1.4.18           py37h59b6b97_0
mkl                       2021.4.0           h0e2418a_729    conda-forge
msgpack                   1.0.2                    pypi_0    pypi
msgpack-numpy             0.4.7.1                  pypi_0    pypi
msys2-conda-epoch         20160418                      1    conda-forge
networkx                  2.6.3              pyhd3eb1b0_0
ninja                     1.10.2               h6d14046_1
numba                     0.54.1                   pypi_0    pypi
numpy                     1.19.0           py37hae9e721_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
opencv-python             4.2.0.34                 pypi_0    pypi
openjpeg                  2.4.0                hb211442_1    conda-forge
openssl                   1.1.1l               h2bbff1b_0
packaging                 21.0               pyhd8ed1ab_0    conda-forge
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
pillow                    8.3.1            py37h4fa10fc_0
pip                       21.2.4           py37haa95532_0
pkginfo                   1.7.1            py37haa95532_0
pooch                     1.5.2              pyhd8ed1ab_0    conda-forge
psutil                    5.8.0            py37h2bbff1b_1
py-lief                   0.10.1           py37ha925a31_0
pycosat                   0.6.3            py37h2bbff1b_0
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyfakewebcam              0.1.0                    pypi_0    pypi
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pysocks                   1.7.1            py37h03978a9_3    conda-forge
python                    3.7.10          h7840368_104_cpython    conda-forge
python-blosc              1.7.0           py37h6538335_1001    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-libarchive-c       2.9                pyhd3eb1b0_1
python_abi                3.7                     2_cp37m    conda-forge
pytorch                   1.7.1           py3.7_cuda110_cudnn8_0    pytorch
pytz                      2021.3             pyhd3eb1b0_0
pywavelets                1.1.1            py37hec80d1f_3    conda-forge
pywin32                   228              py37hbaba5e8_1
pyyaml                    5.3.1                    pypi_0    pypi
pyzmq                     20.0.0                   pypi_0    pypi
requests                  2.25.1             pyhd3deb0d_0    conda-forge
ruamel_yaml               0.15.100         py37h2bbff1b_0
scikit-image              0.18.3           py37h9386db6_0    conda-forge
scipy                     1.7.1            py37hb6553fb_0    conda-forge
setuptools                58.0.4           py37haa95532_0
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
soupsieve                 2.2.1              pyhd3eb1b0_0
sqlite                    3.36.0               h2bbff1b_0
tbb                       2021.3.0             h2d74725_0    conda-forge
tifffile                  2020.10.1        py37h8c2d366_2
tk                        8.6.11               h8ffe710_1    conda-forge
toolz                     0.11.1                     py_0    conda-forge
torchvision               0.2.2                      py_3    pytorch
tornado                   6.1              py37hcc03f2d_1    conda-forge
tqdm                      4.62.3                   pypi_0    pypi
typing_extensions         3.10.0.2           pyh06a4308_0
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wheel                     0.37.0             pyhd3eb1b0_1
win_inet_pton             1.1.0            py37h03978a9_2    conda-forge
wincertstore              0.2              py37haa95532_2
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
zfp                       0.5.5                h0e60522_7    conda-forge
zlib                      1.2.11            h8ffe710_1013    conda-forge
zstd                      1.4.9                h19a0ad4_0
CONDA_DEFAULT_ENV=avatarify
CONDA_EXE=C:\Users\user\miniconda3\envs\avatarify\condabin\..\Scripts\conda.exe
CONDA_PREFIX=C:\Users\user\miniconda3\envs\avatarify
CONDA_PREFIX_1=C:\Users\user\miniconda3
CONDA_PROMPT_MODIFIER=(avatarify)
CONDA_PYTHON_EXE=C:\Users\user\miniconda3\python.exe
CONDA_SHLVL=2
C:\Users\user\miniconda3\envs\avatarify
C:\Users\user\miniconda3\envs\avatarify\Library\mingw-w64\bin
C:\Users\user\miniconda3\envs\avatarify\Library\usr\bin
C:\Users\user\miniconda3\envs\avatarify\Library\bin
C:\Users\user\miniconda3\envs\avatarify\Scripts
C:\Users\user\miniconda3\envs\avatarify\bin
C:\Users\user\miniconda3\condabin
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler
C:\Program Files\AdoptOpenJDK\jre-11.0.7.10-hotspot\bin
C:\Program Files\AdoptOpenJDK\jre-8.0.252.09-hotspot\bin
C:\Program Files (x86)\AdoptOpenJDK\jre-8.0.252.09-hotspot\bin
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0
C:\Windows\System32\OpenSSH
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0
C:\WINDOWS\System32\OpenSSH
C:\ProgramData\chocolatey\bin
C:\Program Files\Git\cmd
C:\Users\user\AppData\Local\Microsoft\WindowsApps

Screenshots

Logs

(base) C:\Users\user\avatarify-python>run_windows.bat
[1634543783.933172] Loading Predictor
Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to C:\Users\user/.cache\torch\hub\checkpoints\s3fd-619a316812.pth
Traceback (most recent call last):
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 1350, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "C:\Users\user\miniconda3\envs\avatarify\lib\http\client.py", line 1277, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\http\client.py", line 1323, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\http\client.py", line 1272, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\http\client.py", line 1032, in _send_output
    self.send(msg)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\http\client.py", line 972, in send
    self.connect()
  File "C:\Users\user\miniconda3\envs\avatarify\lib\http\client.py", line 1447, in connect
    server_hostname=server_hostname)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\ssl.py", line 423, in wrap_socket
    session=session
  File "C:\Users\user\miniconda3\envs\avatarify\lib\ssl.py", line 870, in _create
    self.do_handshake()
  File "C:\Users\user\miniconda3\envs\avatarify\lib\ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "afy/cam_fomm.py", line 218, in <module>
    **predictor_args
  File "C:\Users\user\avatarify-python\afy\predictor_local.py", line 49, in __init__
    self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=True, device=self.device)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\site-packages\face_alignment\api.py", line 75, in __init__
    self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 24, in __init__
    model_weights = load_url(models_urls['s3fd'])
  File "C:\Users\user\miniconda3\envs\avatarify\lib\site-packages\torch\hub.py", line 555, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\site-packages\torch\hub.py", line 425, in download_url_to_file
    u = urlopen(req)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 543, in _open
    '_open', req)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 503, in _call_chain
    result = func(*args)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 1393, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "C:\Users\user\miniconda3\envs\avatarify\lib\urllib\request.py", line 1352, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>
@JohanAR
Copy link
Collaborator

JohanAR commented Oct 18, 2021

Have you tried again later? I'm not getting any SSL certificate error if I try to download https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth using a web browser currently

@jumanates
Copy link

Have you tried again later? I'm not getting any SSL certificate error if I try to download https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth using a web browser currently

how is it where i have to put this element ? ty so much help me with this

@JohanAR
Copy link
Collaborator

JohanAR commented Nov 26, 2021

The log you posted says it was trying to download it to C:\Users\user/.cache\torch\hub\checkpoints\s3fd-619a316812.pth

Did you also try just running run_windows.bat again? In case there was a temporary certificate error on the web server

@rhessinger
Copy link

I have the exact same problem when executing run_windows.bat. I have tried running it multiple times and it failed every time with the certificate expired error. Anything else to try?

@Psonchef
Copy link

Psonchef commented Mar 6, 2022

Pls I’m having this same issue and I’m new to this, pls can I get a simple step by step help to configure this ?

@likohank
Copy link

Pls I’m having this same issue and I’m new to this, pls can I get a simple step by step help to configure this ?

@Psonchef This can help you [235]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants