I want to load the BPEmb model on a machine which is accessbile using proxy only.
Initially, I configured the proxy setting, environment and tried. But it couldn’t load the model.
Therefore I downloaded the BPEmb files manually and stored in a folder and gave the path.
However, I still get the error:
downloading https://nlp.h-its.org/bpemb/en/en.wiki.bpe.vs10000.model
Traceback (most recent call last):
bpemb_en = BPEmb(lang=”en”, vs=10000, cache_dir=’/home/ss/BPEmb’)
File “/home/sd/.local/lib/python3.10/site-packages/bpemb/bpemb.py”, line 173, in init
self.model_file = self._load_file(model_file)
File “/home/sd/.local/lib/python3.10/site-packages/bpemb/bpemb.py”, line 228, in _load_file
return http_get(file_url, cached_file, ignore_tardir=True)
File “/home/sd/.local/lib/python3.10/site-packages/bpemb/util.py”, line 48, in http_get
headers = http_get_temp(url, temp_file)
File “/home/sd/.local/lib/python3.10/site-packages/bpemb/util.py”, line 23, in http_get_temp
req = requests.get(url, stream=True, verify=False)
File “/usr/lib/python3/dist-packages/requests/api.py”, line 76, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3/dist-packages/requests/api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 544, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 657, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python3/dist-packages/requests/adapters.py”, line 439, in send
resp = conn.urlopen(
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 697, in urlopen
self._prepare_proxy(conn)
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 971, in _prepare_proxy
conn.connect()
File “/usr/lib/python3/dist-packages/urllib3/connection.py”, line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File “/usr/lib/python3/dist-packages/urllib3/connection.py”, line 500, in connect_tls_proxy
return ssl_wrap_socket(
File “/usr/lib/python3/dist-packages/urllib3/util/ssl.py”, line 453, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls)
File “/usr/lib/python3/dist-packages/urllib3/util/ssl.py”, line 495, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File “/usr/lib/python3.10/ssl.py”, line 513, in wrap_socket
return self.sslsocket_class._create(
File “/usr/lib/python3.10/ssl.py”, line 1028, in _create
raise ValueError(“check_hostname requires server_hostname”)
ValueError: check_hostname requires server_hostname
Is it the right way to load model from downloaded files? Or any suggestion to download