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

Errror #235

Closed
AGVD opened this issue Jun 28, 2020 · 9 comments
Closed

Errror #235

AGVD opened this issue Jun 28, 2020 · 9 comments

Comments

@AGVD
Copy link

AGVD commented Jun 28, 2020

(base) C:\Users\thepc\avatarify> run_windows.bat
[1593366601.652137] Loading Predictor
C:\Users\thepc\avatarify\afy\predictor_local.py:34: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)
Downloading the face detection CNN. Please wait...
Traceback (most recent call last):
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 1319, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\http\client.py", line 966, in send
self.connect()
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\http\client.py", line 1422, in connect
server_hostname=server_hostname)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\ssl.py", line 423, in wrap_socket
session=session
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\ssl.py", line 870, in _create
self.do_handshake()
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "afy/cam_fomm.py", line 195, in
**predictor_args
File "C:\Users\thepc\avatarify\afy\predictor_local.py", line 27, in init
self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=True, device=self.device)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\site-packages\face_alignment\api.py", line 66, in init
self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 39, in init
os.path.join(path_to_temp_detector))
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 543, in _open
'_open', req)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 1362, in https_open
context=self._context, check_hostname=self._check_hostname)
File "C:\Users\thepc\miniconda3\envs\avatarify\lib\urllib\request.py", line 1321, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)>

(avatarify) C:\Users\thepc\avatarify>

;//

@bobvo23
Copy link
Contributor

bobvo23 commented Jul 23, 2020

You need to install certificates. Check this guide here for some clues.
https://stackoverflow.com/questions/50236117/scraping-ssl-certificate-verify-failed-error-for-http-en-wikipedia-org

@JohanAR
Copy link
Collaborator

JohanAR commented Jan 13, 2021

Since we haven't heard from the poster in a half year I'm going to assume that they either solved their problem or moved on to other things. Feel free to re-open the issue or create a new one if there is anything pointing to the existence of a bug in Avatarify

@JohanAR JohanAR closed this as completed Jan 13, 2021
@zarklon
Copy link

zarklon commented Jan 25, 2022

I ran the python version fine on my WIn10 Rtx 2060 card but since upgrading to RTX 3070TI I have uninstalled all known avatarify and avatarify-python folders and ran the tutorial's commans and what I'm getting is similar to the OP above. Any idea what I may need to do? I saw things were updated to be compatible with 30XX series cards Sorry if this one is a necro O_o..
My miniconda3 console reads
[1643087547.719206] Loading Predictor
Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to C:\Users\Zarkl/.cache\torch\hub\checkpoints\s3fd-619a316812.pth
Traceback (most recent call last):
File "J:\Miniconda3\envs\avatarify\lib\urllib\request.py", line 1350, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "J:\Miniconda3\envs\avatarify\lib\http\client.py", line 1281, in request
self._send_request(method, url, body, headers, encode_chunked)
File "J:\Miniconda3\envs\avatarify\lib\http\client.py", line 1327, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "J:\Miniconda3\envs\avatarify\lib\http\client.py", line 1276, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "J:\Miniconda3\envs\avatarify\lib\http\client.py", line 1036, in _send_output
self.send(msg)
File "J:\Miniconda3\envs\avatarify\lib\http\client.py", line 976, in send
self.connect()
File "J:\Miniconda3\envs\avatarify\lib\http\client.py", line 1451, in connect
server_hostname=server_hostname)
File "J:\Miniconda3\envs\avatarify\lib\ssl.py", line 423, in wrap_socket
session=session
File "J:\Miniconda3\envs\avatarify\lib\ssl.py", line 870, in _create
self.do_handshake()
File "J:\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
**predictor_args
File "C:\Users\Zarkl\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 "J:\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 "J:\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 "J:\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 "J:\Miniconda3\envs\avatarify\lib\site-packages\torch\hub.py", line 425, in download_url_to_file
u = urlopen(req)
File "J:\Miniconda3\envs\avatarify\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "J:\Miniconda3\envs\avatarify\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "J:\Miniconda3\envs\avatarify\lib\urllib\request.py", line 543, in _open
'_open', req)
File "J:\Miniconda3\envs\avatarify\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "J:\Miniconda3\envs\avatarify\lib\urllib\request.py", line 1393, in https_open
context=self._context, check_hostname=self._check_hostname)
File "J:\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)>

Win 10 Rtx 3070TI --

@JohanAR
Copy link
Collaborator

JohanAR commented Jan 25, 2022

Sounds like it's trying to

Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to C:\Users\Zarkl/.cache\torch\hub\checkpoints\s3fd-619a316812.pth

But the server that it's downloading from has an expired certificate. You could try manually downloading that file to that exact location on your harddrive and see if it helps.

@zarklon
Copy link

zarklon commented Feb 2, 2022

Sounds like it's trying to

Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to C:\Users\Zarkl/.cache\torch\hub\checkpoints\s3fd-619a316812.pth

But the server that it's downloading from has an expired certificate. You could try manually downloading that file to that exact location on your harddrive and see if it helps.

Thanks so much your suggestion helped!! This means so much to me ;D

It seemed that doing that first file didnt help but the 2nd one that was also giving an error made everything work smoothly.

@justme220011
Copy link

please how did you solve this issue , i am running avatarify-python-youtube and i am getting this issue
(avatarify) C:\Users\OMEN\avatarify-python-youtube>run_windows.bat
[1692265692.481420] Loading Predictor
C:\Users\OMEN\miniconda3\envs\avatarify\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3191.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "afy/cam_fomm.py", line 218, in
**predictor_args
File "C:\Users\OMEN\avatarify-python-youtube\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\OMEN\miniconda3\envs\avatarify\lib\enum.py", line 354, in getattr
raise AttributeError(name) from None
AttributeError: _2D

@vicktaw
Copy link

vicktaw commented Feb 24, 2024

please how did you solve this issue , i am running avatarify-python-youtube and i am getting this issue (avatarify) C:\Users\OMEN\avatarify-python-youtube>run_windows.bat [1692265692.481420] Loading Predictor C:\Users\OMEN\miniconda3\envs\avatarify\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3191.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "afy/cam_fomm.py", line 218, in **predictor_args File "C:\Users\OMEN\avatarify-python-youtube\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\OMEN\miniconda3\envs\avatarify\lib\enum.py", line 354, in getattr raise AttributeError(name) from None AttributeError: _2D

I had the same issue, but I finally got it fixed through an unconventional method... though it works now it runs at 1FPS which is slow

@vicktaw
Copy link

vicktaw commented Feb 24, 2024

For those of you still having issues installing this app, view my post on it through this link: #484 (comment)

@SanPatrick01
Copy link

image

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

7 participants