QNetworkAccessManager https UnknownNetworkError when using pyside2

Hello, I’m using the QNetworkAccessManager module and it works fine with HTTP requests, but when I try to do https requests it fails and returns “PySide2.QtNetwork.QNetworkReply.NetworkError.UnknownNetworkError: TLS initialization failed”
this problem only happens with pyside2 on windows.
but it works fine on Mac os.
when I used the same piece of code with pyqt5 it worked just fine on both Windows and Mac os.
https requests:
1.pyside2 on windows: fails
2.pyside2 on mac: works fine
3. pyqt5 on windows: works fine
4. pyqt5 on mac: works fine
and I’m stuck with it for a while and can’t seem to find the problem.

from PySide2 import QtNetwork
from PySide2 import QtCore
import sys, json

class Example:

def __init__(self):
    self.nam = QtNetwork.QNetworkAccessManager()

def do_request(self):
    url = 'https://httpbin.org/get'
    req = QtNetwork.QNetworkRequest(QtCore.QUrl(url))

def handle_response(self, reply):
    er = reply.error()
    if er == QtNetwork.QNetworkReply.NoError:
        bytes_string = reply.readAll()
        print(str(bytes_string, 'utf-8'))
        print(f'Error occurred: {er}: {reply.errorString()}')

def main():
app = QtCore.QCoreApplication([])
ex = Example()

if name == ‘main’:

I’m using python 3.7 and pyside2 5.15