Issue on RealESRGAn & SSL #276

Open
opened 2026-01-29 21:46:24 +00:00 by claunia · 5 comments
Owner

Originally created by @Oleh0374 on GitHub (Oct 16, 2022).

Hello.
there is two problems:

  1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"
  2. Error on check SSL certificate:
    "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"
Originally created by @Oleh0374 on GitHub (Oct 16, 2022). Hello. there is two problems: 1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'" 2. Error on check SSL certificate: "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"
Author
Owner

@netrunner-exe commented on GitHub (Oct 16, 2022):

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...

Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

@netrunner-exe commented on GitHub (Oct 16, 2022): > Hello. there is two problems: > > 1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'" > > 2. Error on check SSL certificate: > "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>" The problem seems to be that in your url is missing a dash in RealESRGAN... Correct url is: `https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth`
Author
Owner

@Oleh0374 commented on GitHub (Oct 17, 2022):

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...

Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction.
Another question.
In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea?
Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',
@Oleh0374 commented on GitHub (Oct 17, 2022): > > Hello. there is two problems: > > ``` > > 1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'" > > > > 2. Error on check SSL certificate: > > "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>" > > ``` > > The problem seems to be that in your url is missing a dash in RealESRGAN... > > Correct url is: `https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth` Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks. if args.bg_upsampler == 'realesrgan': if not torch.cuda.is_available(): # CPU import warnings warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. ' 'If you really want to use it, please modify the corresponding codes.') bg_upsampler = None else: from basicsr.archs.rrdbnet_arch import RRDBNet from realesrgan import RealESRGANer model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2) bg_upsampler = RealESRGANer( scale=2, model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',
Author
Owner

@netrunner-exe commented on GitHub (Oct 17, 2022):

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...
Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?

@netrunner-exe commented on GitHub (Oct 17, 2022): > > > Hello. there is two problems: > > > ``` > > > 1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'" > > > > > > 2. Error on check SSL certificate: > > > "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>" > > > ``` > > > > > > The problem seems to be that in your url is missing a dash in RealESRGAN... > > Correct url is: `https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth` > > Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks. > > ``` > if args.bg_upsampler == 'realesrgan': > if not torch.cuda.is_available(): # CPU > import warnings > warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. ' > 'If you really want to use it, please modify the corresponding codes.') > bg_upsampler = None > else: > from basicsr.archs.rrdbnet_arch import RRDBNet > from realesrgan import RealESRGANer > model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2) > bg_upsampler = RealESRGANer( > scale=2, > model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth', > ``` To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?
Author
Owner

@Oleh0374 commented on GitHub (Oct 17, 2022):

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...
Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?

Thank you! ! it was so obvious ! my mistake... I didn't see the last requirement on the readme page.

@Oleh0374 commented on GitHub (Oct 17, 2022): > > > > Hello. there is two problems: > > > > ``` > > > > 1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'" > > > > > > > > 2. Error on check SSL certificate: > > > > "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>" > > > > ``` > > > > > > > > > The problem seems to be that in your url is missing a dash in RealESRGAN... > > > Correct url is: `https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth` > > > > > > Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks. > > ``` > > if args.bg_upsampler == 'realesrgan': > > if not torch.cuda.is_available(): # CPU > > import warnings > > warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. ' > > 'If you really want to use it, please modify the corresponding codes.') > > bg_upsampler = None > > else: > > from basicsr.archs.rrdbnet_arch import RRDBNet > > from realesrgan import RealESRGANer > > model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2) > > bg_upsampler = RealESRGANer( > > scale=2, > > model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth', > > ``` > > To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own? Thank you! ! it was so obvious ! my mistake... I didn't see the last requirement on the readme page.
Author
Owner

@Oleh0374 commented on GitHub (Oct 17, 2022):

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...
Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?

Thank you! ! it was so obvious ! my mistake... I didn't see the last requirement on the readme page.

Now it remains to find the solution for my second question for the SSL certificate..

@Oleh0374 commented on GitHub (Oct 17, 2022): > > > > > Hello. there is two problems: > > > > > ``` > > > > > 1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'" > > > > > > > > > > 2. Error on check SSL certificate: > > > > > "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, 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:1122)>" > > > > > ``` > > > > > > > > > > > > The problem seems to be that in your url is missing a dash in RealESRGAN... > > > > Correct url is: `https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth` > > > > > > > > > Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks. > > > ``` > > > if args.bg_upsampler == 'realesrgan': > > > if not torch.cuda.is_available(): # CPU > > > import warnings > > > warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. ' > > > 'If you really want to use it, please modify the corresponding codes.') > > > bg_upsampler = None > > > else: > > > from basicsr.archs.rrdbnet_arch import RRDBNet > > > from realesrgan import RealESRGANer > > > model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2) > > > bg_upsampler = RealESRGANer( > > > scale=2, > > > model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth', > > > ``` > > > > > > To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own? > > Thank you! ! it was so obvious ! my mistake... I didn't see the last requirement on the readme page. Now it remains to find the solution for my second question for the SSL certificate..
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#276