无法通过Divio Desktop App设置本地服务器-“服务“网络”无法建立

时间:2018-12-03 02:09:11

标签: docker wagtail divio

使用“ Python 3.5.x”,“ Wagtail”和“ Blank Boilerplate”进行本地开发时,控制台将返回错误

我检查了docker命令是否有效,只是不确定为什么会收到上述错误消息。

运行Mac OS X Mojave 10.14.1

Creating workspace

cloning project repository
Cloning into '/Users/charlie/Django_projects/divio-project/test-project3'...
Warning: Permanently added the RSA host key for IP address '217.150.252.171' to the list of known hosts.
Locking the website...
remote: Counting objects: 64, done.
remote: Compressing objects: 100% (53/53), done.
Unlocking the website...

remote: Total 64 (delta 20), reused 0 (delta 0)
Receiving objects: 100% (64/64), 14.86 KiB | 490.00 KiB/s, done.
Resolving deltas: 100% (20/20), done.
downloading remote docker images
Pulling db  ... done
Pulling web ... done
building local docker images
db uses an image, skipping
Building web
Step 1/7 : FROM aldryn/base-project:py3-3.23
 ---> c0f7353db6c7
Step 2/7 : ENV PIP_INDEX_URL=${PIP_INDEX_URL:-https://wheels.aldryn.net/v1/aldryn-extras+pypi/${WHEELS_PLATFORM:-aldryn-baseproject-py3}/+simple/}     WHEELSPROXY_URL=${WHEELSPROXY_URL:-https://wheels.aldryn.net/v1/aldryn-extras+pypi/${WHEELS_PLATFORM:-aldryn-baseproject-py3}/}
 ---> Using cache
 ---> 7d0e665580f2
Step 3/7 : COPY requirements.* /app/
 ---> Using cache
 ---> 6de2503acd0c
Step 4/7 : COPY addons-dev /app/addons-dev/
 ---> Using cache
 ---> 36d866144ce1
Step 5/7 : RUN pip-reqs compile &&     pip-reqs resolve &&     pip install         --no-index --no-deps         --requirement requirements.urls
 ---> Using cache
 ---> 012d56b55012
Step 6/7 : COPY . /app
 ---> 44ca04bf2c80
Step 7/7 : RUN DJANGO_MODE=build python manage.py collectstatic --noinput
 ---> Running in 8f76702a142e
Failed to import the site module
Traceback (most recent call last):
  File "/virtualenv/lib/python3.5/site.py", line 703, in <module>
    main()
  File "/virtualenv/lib/python3.5/site.py", line 683, in main
    paths_in_sys = addsitepackages(paths_in_sys)
  File "/virtualenv/lib/python3.5/site.py", line 282, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "/virtualenv/lib/python3.5/site.py", line 204, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/virtualenv/lib/python3.5/site.py", line 173, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "/virtualenv/lib/python3.5/site-packages/fix_certifi_hack.py", line 26, in <module>
    os.environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
AttributeError: module 'certifi' has no attribute 'old_where'
ERROR: Service 'web' failed to build: The command '/bin/sh -c DJANGO_MODE=build python manage.py collectstatic --noinput' returned a non-zero code: 1

--------------------------------------------------------------------------------

There was an error trying to run a command. This is most likely
not an issue with divio-cli, but the called program itself.
Try checking the output of the command above.
The command was:
  docker-compose -f /Users/charlie/Django_projects/divio-project/test-project3/docker-compose.yml build

这是我遵循的步骤:

  1. 在Divio网站上添加了项目(Python 3.5.x,Wa,空白样板)
  2. 下载并安装了Mac版Divio桌面应用程序
  3. 打开添加的项目
  4. 点击“设置”(本地服务器)
  5. 弹出终端,然后运行上面的代码
  6. 错误消息:错误:服务'web'生成失败:命令'/ bin / sh -c DJANGO_MODE = build python manage.py collectstatic --noinput'返回了非零代码:1

谢谢。

2 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,看来Certifi软件包中已弃用了一些代码: https://pypi.org/project/certifi/#history

上周末发布了一个新版本。

要解决此问题,只需在需求文件底部添加以下内容,即可将您使用的软件包的版本强制为2018.10.15

certifi==2018.10.15

希望这会有所帮助。

答案 1 :(得分:-1)

安装Divio Desktop App并运行今天的安装程序后,我遇到了同样的问题,但是由于没有安装日志,也没有文件要求,因为安装程序甚至无法创建项目目录。

我卸载了Divio Desktop App和Docker(占用3.65 GB磁盘空间,而可执行文件仅为1.20 GB),并更改了密码,以防万一(在安装软件/期间,系统和教程要求我的笔记本电脑和Github密码)安装程序),建议您不要使用此软件。