gpt4 book ai didi

python - 为什么 'fig build'返回:AttributeError: 'WrappedSocket'对象没有属性 'recvfrom'?

转载 作者:行者123 更新时间:2023-12-02 21:28:39 25 4
gpt4 key购买 nike

我的命令:(我也尝试过无花果构建--no-cache)

fig build
db uses an image, skipping
Building web...
Traceback (most recent call last):
File "/usr/local/bin/fig", line 9, in <module>
load_entry_point('fig==1.0.1', 'console_scripts', 'fig')()
File "/Library/Python/2.7/site-packages/fig/cli/main.py", line 31, in main
command.sys_dispatch()
File "/Library/Python/2.7/site-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch
self.dispatch(sys.argv[1:], None)
File "/Library/Python/2.7/site-packages/fig/cli/command.py", line 28, in dispatch
super(Command, self).dispatch(*args, **kwargs)
File "/Library/Python/2.7/site-packages/fig/cli/docopt_command.py", line 24, in dispatch
self.perform_command(*self.parse(argv, global_options))
File "/Library/Python/2.7/site-packages/fig/cli/command.py", line 56, in perform_command
handler(project, command_options)
File "/Library/Python/2.7/site-packages/fig/cli/main.py", line 119, in build
project.build(service_names=options['SERVICE'], no_cache=no_cache)
File "/Library/Python/2.7/site-packages/fig/project.py", line 166, in build
service.build(no_cache)
File "/Library/Python/2.7/site-packages/fig/service.py", line 397, in build
all_events = stream_output(build_output, sys.stdout)
File "/Library/Python/2.7/site-packages/fig/progress_stream.py", line 17, in stream_output
for chunk in output:
File "/Library/Python/2.7/site-packages/docker/client.py", line 279, in _stream_helper
socket_fp = socket_obj(_sock=self._get_raw_response_socket(response))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 190, in __init__
setattr(self, method, getattr(_sock, method))
AttributeError: 'WrappedSocket' object has no attribute 'recvfrom'

Dockerfile:
FROM php:5.6-apache


web:
build: .
links:
- db
ports:
- "80:80"
volumes:
- Symfony/:/var/www/html/
environment:
SYMFONY_ENV: dev
db:
image: mysql:latest
ports:
- "3306:3306"

我尝试使用空的fig.yml构建无花果,但仍然收到错误,我认为这可能与我遇到的一些SSL错误有关,所以我安装了
pip install requests[security]

我尝试卸载请求和无花果,然后重新安装它们。

这就是所有使用boot2docker的MacOSX Yosemite(正在运行)。
boot2docker -v
Boot2Docker-cli version: v1.6.2
Git commit: cb2c3bc

docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2
OS/Arch (client): darwin/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

fig --version
fig 1.0.1

最佳答案

显然,我通过pip安装的安全软件包需要较新版本的Python。我几乎完全按照此指南进行了升级,以使Python正常运行,一切都变得很吸引人:https://wolfpaulus.com/jounal/mac/installing_python_osx/

关于python - 为什么 'fig build'返回:AttributeError: 'WrappedSocket'对象没有属性 'recvfrom'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30413007/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com