Hi, I'm getting similar errors to the following, multiple times, when trying to do "lean cloud pull": Cannot pull 'CSharp/TradingAlgorithm 14' (id 4863107): Please make sure Docker is installed and running

I should note, I'm on MacOS. I also have already verified that “Allow the default Docker socket to be used (requires password)” is enabled in the Docker options, as suggested in a similar thread.

Commands like “docker images” work just fine, which I believe indicates that docker is working properly.

I added a print statement to the urllib3 connectionpool.py file and found that the url that is causing the problem is “/version” if that's helpful. Here is my print statement code:<br><br>

 

   # Make the request on the HTTPConnection object<br>      

#kmw is just my name's initials
print("kmw the url is ", url, " ------ KMW DONE")

response = self._make_request(               conn,               method,               url,               timeout=timeout_obj,               body=body,               headers=headers,               chunked=chunked,               retries=retries,               response_conn=response_conn,               preload_content=preload_content,               decode_content=decode_content,

 

 

Here is the relevant output from “lean cloud pull --verbose”:

Cannot pull 'CSharp/TradingAlgorithm 17' (id 4863107): Please make sure Docker is installed and running[3/26] Pulling 'Casual Fluorescent Orange Alpaca 16'--> POST https://www.quantconnect.com/api/v2/projects/update with data:{   "projectId": 18302934,   "name": "Casual Fluorescent Orange Alpaca 17"}kmw the url is  /api/v2/projects/update  ------ KMW DONERequest response: {"success":true}Renamed project in cloud from 'Casual Fluorescent Orange Alpaca 16' to 'Casual Fluorescent Orange Alpaca 17'kmw the url is  /version  ------ KMW DONETraceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 790, in urlopen   response = self._make_request(              ^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 495, in _make_request   conn.request( File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 398, in request   self.endheaders() File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1326, in endheaders   self._send_output(message_body, encode_chunked=encode_chunked) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1085, in _send_output   self.send(msg) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1029, in send   self.connect() File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/transport/unixconn.py", line 26, in connect   sock.connect(self.unix_socket)FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/adapters.py", line 667, in send   resp = conn.urlopen(          ^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 844, in urlopen   retries = retries.increment(             ^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/util/retry.py", line 474, in increment   raise reraise(type(error), error, _stacktrace)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/util/util.py", line 38, in reraise   raise value.with_traceback(tb) File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 790, in urlopen   response = self._make_request(              ^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 495, in _make_request   conn.request( File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 398, in request   self.endheaders() File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1326, in endheaders   self._send_output(message_body, encode_chunked=encode_chunked) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1085, in _send_output   self.send(msg) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1029, in send   self.connect() File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/transport/unixconn.py", line 26, in connect   sock.connect(self.unix_socket)urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 223, in_retrieve_server_version   return self.version(api_version=False)["ApiVersion"]          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/daemon.py", line 181, in version   return self._result(self._get(url), json=True)                       ^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/utils/decorators.py", line 44, in inner   return f(self, *args, **kwargs)          ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 246, in _get   return self.get(url, **self._set_request_timeout(kwargs))          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get   return self.request("GET", url, **kwargs)          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request   resp = self.send(prep, **send_kwargs)          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send   r = adapter.send(request, **kwargs)       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/adapters.py", line 682, in send   raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/docker/docker_manager.py", line 533,in _get_docker_client   docker_client = from_env()                   ^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/client.py", line 94, in from_env   return cls(          ^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/client.py", line 45, in __init__   self.api = APIClient(*args, **kwargs)              ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 207, in __init__   self._version = self._retrieve_server_version()                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 230, in_retrieve_server_version   raise DockerException(docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/cloud/pull_manager.py", line 140, inpull_projects   projects_with_paths.append((project, self._pull_project(project, encryption_action, encryption_key)))                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/cloud/pull_manager.py", line 189, in_pull_project   self._pull_files(project, local_project_path, encryption_action, encryption_key) File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/cloud/pull_manager.py", line 218, in_pull_files   self._project_manager.create_new_project(local_project_path, project.language) File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/util/project_manager.py", line 198, increate_new_project   framework_ver = self._docker_manager.get_image_label(image, 'target_framework',                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/docker/docker_manager.py", line 42, inget_image_label   docker_image = self._get_docker_client().images.get(str(image))                  ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/docker/docker_manager.py", line 535,in _get_docker_client   raise errorlean.models.errors.MoreInfoError: Please make sure Docker is installed and running[1/26] Pulling '3 param optimization example - see results graph 15'--> POST https://www.quantconnect.com/api/v2/projects/update with data:{   "projectId": 18846323,   "name": "3 param optimization example - see results graph 16"}Request response: {"success":true}Renamed project in cloud from '3 param optimization example - see results graph 15' to '3 param optimization example - see results graph 16'Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 790, in urlopen   response = self._make_request(              ^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 495, in _make_request   conn.request( File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 398, in request   self.endheaders() File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1326, in endheaders   self._send_output(message_body, encode_chunked=encode_chunked) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1085, in _send_output   self.send(msg) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1029, in send   self.connect() File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/transport/unixconn.py", line 26, in connect   sock.connect(self.unix_socket)FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/adapters.py", line 667, in send   resp = conn.urlopen(          ^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 844, in urlopen   retries = retries.increment(             ^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/util/retry.py", line 474, in increment   raise reraise(type(error), error, _stacktrace)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/util/util.py", line 38, in reraise   raise value.with_traceback(tb) File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 790, in urlopen   response = self._make_request(              ^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 495, in _make_request   conn.request( File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/urllib3/connection.py", line 398, in request   self.endheaders() File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1326, in endheaders   self._send_output(message_body, encode_chunked=encode_chunked) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1085, in _send_output   self.send(msg) File "/Users/kevinwheeler/.pyenv/versions/3.12.2/lib/python3.12/http/client.py", line 1029, in send   self.connect() File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/transport/unixconn.py", line 26, in connect   sock.connect(self.unix_socket)urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 223, in_retrieve_server_version   return self.version(api_version=False)["ApiVersion"]          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/daemon.py", line 181, in version   return self._result(self._get(url), json=True)                       ^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/utils/decorators.py", line 44, in inner   return f(self, *args, **kwargs)          ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 246, in _get   return self.get(url, **self._set_request_timeout(kwargs))          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get   return self.request("GET", url, **kwargs)          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request   resp = self.send(prep, **send_kwargs)          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send   r = adapter.send(request, **kwargs)       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/requests/adapters.py", line 682, in send   raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/docker/docker_manager.py", line 533,in _get_docker_client   docker_client = from_env()                   ^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/client.py", line 94, in from_env   return cls(          ^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/client.py", line 45, in __init__   self.api = APIClient(*args, **kwargs)              ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 207, in __init__   self._version = self._retrieve_server_version()                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/docker/api/client.py", line 230, in_retrieve_server_version   raise DockerException(docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/cloud/pull_manager.py", line 140, inpull_projects   projects_with_paths.append((project, self._pull_project(project, encryption_action, encryption_key)))                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/cloud/pull_manager.py", line 189, in_pull_project   self._pull_files(project, local_project_path, encryption_action, encryption_key) File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/cloud/pull_manager.py", line 218, in_pull_files   self._project_manager.create_new_project(local_project_path, project.language) File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/util/project_manager.py", line 198, increate_new_project   framework_ver = self._docker_manager.get_image_label(image, 'target_framework',                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/docker/docker_manager.py", line 42, inget_image_label   docker_image = self._get_docker_client().images.get(str(image))                  ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kevinwheeler/Library/CloudStorage/Dropbox/private/programmingStuff/quantConnectCliStuff/myenv/lib/python3.12/site-packages/lean/components/docker/docker_manager.py", line 535,in _get_docker_client   raise errorlean.models.errors.MoreInfoError: Please make sure Docker is installed and runningCannot pull '3 param optimization example - see results graph 16' (id 18846323): Please make sure Docker is installed and running