NameError: name 'NpipeHTTPAdapter' is not defined
See original GitHub issueGetting this when running ‘aws sam local start-api’
doesnt look like docker issues
pip 19.3.1 aws-sam-cli 0.22.0
Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
local start-api command is called
Collected default values for parameters: {}
2 resources found in the template
Sending Telemetry: {'metrics': [{'commandRun': {'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam local start-api', 'duration': 37, 'exitReason': 'DockerException', 'exitCode': 255, 'requestId': '3c51c498-e9db-451d-bf4a-fd5240e5f305', 'installationId': '072d408a-950f-4a21-bb6b-cea85e65da65', 'sessionId': 'f271c9bb-1a19-41ea-aade-3b5fc99bac80', 'executionEnvironment': 'CLI', 'pyversion': '3.8.0', 'samcliVersion': '0.22.0'}}]}
HTTPSConnectionPool(host='aws-serverless-tools-telemetry.us-west-2.amazonaws.com', port=443): Read timed out. (read timeout=0.1)
Traceback (most recent call last):
File "c:\program files\python38\lib\site-packages\docker\api\client.py", line 154, in __init__
self._custom_adapter = NpipeHTTPAdapter(
NameError: name 'NpipeHTTPAdapter' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python38\Scripts\sam.exe\__main__.py", line 7, in <module>
File "c:\program files\python38\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\program files\python38\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\program files\python38\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\program files\python38\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files\python38\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\samcli\lib\telemetry\metrics.py", line 93, in wrapped
raise exception # pylint: disable=raising-bad-type
File "c:\program files\python38\lib\site-packages\samcli\lib\telemetry\metrics.py", line 62, in wrapped
return_value = func(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\samcli\commands\local\start_api\cli.py", line 75, in cli
do_cli(
File "c:\program files\python38\lib\site-packages\samcli\commands\local\start_api\cli.py", line 123, in do_cli
with InvokeContext(
File "c:\program files\python38\lib\site-packages\samcli\commands\local\cli_common\invoke_context.py", line 141, in __enter__
self._container_manager = self._get_container_manager(self._docker_network, self._skip_pull_image)
File "c:\program files\python38\lib\site-packages\samcli\commands\local\cli_common\invoke_context.py", line 381, in _get_container_manager
return ContainerManager(docker_network_id=docker_network, skip_pull_image=skip_pull_image)
File "c:\program files\python38\lib\site-packages\samcli\local\docker\manager.py", line 34, in __init__
self.docker_client = docker_client or docker.from_env()
File "c:\program files\python38\lib\site-packages\docker\client.py", line 84, in from_env
return cls(
File "c:\program files\python38\lib\site-packages\docker\client.py", line 40, in __init__
self.api = APIClient(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\docker\api\client.py", line 158, in __init__
raise DockerException(
docker.errors.DockerException: Install pypiwin32 package to enable npipe:// support
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
name 'NpipeHTTPAdapter' is not defined. Install pypiwin32 ...
NameError : name 'NpipeHTTPAdapter' is not defined. Install pypiwin32 package to enable npipe:// support #2899.
Read more >`sam local invoke`error 'NameError - aws lambda
_custom_adapter = NpipeHTTPAdapter( NameError: name 'NpipeHTTPAdapter' is not defined During handling of the above exception, ...
Read more >Not able to run local backtest (message "please make sure ...
NameError : name 'NpipeHTTPAdapter' is not defined. During handling of the above exception, another exception occurred: Traceback (most recent call last):
Read more >NameError: name 'NpipeHTTPAdapter' is not defined. Install ...
Docker and Python are installed correctly; Downloaded SAM CLI through .msi. Still receiving the same NameError: name 'NpipeHTTPAdapter' is not defined This ...
Read more >docker-py安装问题记录_Jahson的博客
遇到问题1、NameError: name 'NpipeHTTPAdapter' is not defined 提示,docker.errors.DockerException: Install pypiwin32 package to enable ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
pypiwin32
is a dependency of the docker-py library, for win32 only. Looking at docker-py: https://pypi.org/project/docker/ they don’t yet claim support for python3.8, neither do we (yet). Given the last release of pypiwin32, https://pypi.org/project/pypiwin32/#history, not sure if that even supports py3.8 either.Using the MSI for windows is the best path.
Resolving since the issue was resolved by using the MSI instead of pip.
I think that the issue was caused by upgrading aws-sam-cli via pip resolved by pip uninstalling aws-sam-cli and installing it from .msi