不小心踢掉插线板,电脑非正常关机,重启后配好的 PyCharm + Docker + Django 开发环境居然起不来了,报错信息如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Couldn't refresh skeletons for remote interpreter
failed to run generator3.py for docker-compose://[C:\Users\scs_web\scs_web\docker-compose.yml]:web/python, exit code 1, stderr:
-----
Starting scs_caddy ...
Starting scs_caddy ...
Starting scs_rabbitmq ...
Starting scs_rabbitmq ...
Starting scs_redis ...
Starting scsweb_pycharm_helpers_1 ...
Starting scs_redis ...
Starting scs_pg ...
Starting scs_pg ...
Starting scsweb_pycharm_helpers_1 ...
ERROR: for scsweb_pycharm_helpers_1 Cannot start service pycharm_helpers: network 6680faccddd938e1aca07de048da67ec918d1f44c34212c7fb28fa058cffd93d not found
ERROR: for pycharm_helpers Cannot start service pycharm_helpers: network 6680faccddd938e1aca07de048da67ec918d1f44c34212c7fb28fa058cffd93d not found
Encountered errors while bringing up the project.
-----
|
大意是找不到 pycharm_helpers 的 network,照例 Google 之,有人提供了解决思路:
via -> https://stackoverflow.com/a/49864937
不过他说的可能环境变量配置有变动我这里并没有,所以就试试把所有 Container 干掉,结果果然有效。
1
2
|
# 当然,只干掉有问题的 scsweb_pycharm_helpers_1 这个 container 就 OK,我懒得多查一步,直接全干掉
docker rm -f $(docker ps -a -q)
|
回到 PyCharm 运行项目,嗯,一切正常了
1
2
3
4
5
6
7
8
9
10
11
|
Creating scs_redis ...
Creating scs_pg ...
Creating scsweb_pycharm_helpers_1 ...
Creating scs_caddy ...
Creating scs_rabbitmq ...
Creating scs_web ...
Attaching to scs_web
scs_web | Performing system checks...
scs_web |
scs_web | System check identified no issues (0 silenced).
scs_web | June 15, 2018 - 09:48:24
|