argosopentech / argos-translate

Open-source offline translation library written in Python

Home Page:https://www.argosopentech.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ssl.SSLError: [SSL: TLSV1_UNRECOGNIZED_NAME] tlsv1 unrecognized name (_ssl.c:1091)

kishoreyakkanti opened this issue · comments

Hi,

Function to translate using argostranslate

def trans_argos(text):
url = "https://translate.argosopentech.com/translate"

payload = {
"q": text,
"source": "auto",
"target": "en"
}
headers = {
"Content-Type": "application/json"
}

response = requests.post(url, data=json.dumps(payload), headers=headers)

return response.json()['translatedText']

When i am using this URL I am facing the following error
requests.exceptions.SSLError: HTTPSConnectionPool(host='translate.argosopentech.com', port=443): Max retries exceeded with url: /translate (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))

Please help.

Thanks

https://translate.argosopentech.com/ site seems to have some SSL/TLS misconfiguration which is causing this issue. @PJ-Finlay can you check the issue with the website?

$ curl https://translate.argosopentech.com/
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).

I'm guessing this is an issue with the Cloudfate links here:
https://github.com/argosopentech/argos-train/blob/master/data-index.json

@PJ-Finlay Can you please clarify what are "Cloudfate links"? I searched this repo, but I couldn't find the word "Cloudfate" anywhere. The links in https://github.com/argosopentech/argos-train/blob/master/data-index.json pointed to various .argosdata files in https://data.argosopentech.com/ , but that doesn't seem to have anything called "Cloudfate".

I'm guessing this is an issue with the Cloudfate links here: https://github.com/argosopentech/argos-train/blob/master/data-index.json

@PJ-Finlay please clarify what Cloudfate links you're talking about, and how they relate to the SSL error in the website https://translate.argosopentech.com/