urllib报错errno 111

环境:VMware Ubuntu22.04
报错:在使用包内置命令下载文件时报错,关闭防火墙,以及重置代理的方法均无效。
代码:

import celloracle as co
links = co.data.load_tutorial_links_object() 

报错:

Data not found in the local folder. Loading data from github. Data will be saved at /home/ray/celloracle_data/tutorial_data
Traceback (most recent call last):
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 1354, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1418, in connect
    super().connect()
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 922, in connect
    self.sock = self._create_connection(
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/site-packages/celloracle/utility/data_download_from_web.py", line 50, in _download
    open_url = urlopen(req)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 1397, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 1357, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 1354, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 1418, in connect
    super().connect()
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/http/client.py", line 922, in connect
    self.sock = self._create_connection(
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3508, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-3-52fc91a70d94>", line 1, in <module>
    links = co.data.load_tutorial_links_object()
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/site-packages/celloracle/data/load_data.py", line 98, in load_tutorial_links_object
    download_data_if_data_not_exist(path=path, backup_url=backup_url)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/site-packages/celloracle/utility/data_download_from_web.py", line 26, in download_data_if_data_not_exist
    _download(url=backup_url, path=path)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/site-packages/celloracle/utility/data_download_from_web.py", line 56, in _download
    open_url = urlopen(req, context=create_default_context(cafile=where()))
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 1397, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/home/ray/anaconda3/envs/celloracle_env/lib/python3.8/urllib/request.py", line 1357, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>


环境有没有网,打印出url手动试下下能不能连接上