Bluemix烧瓶应用程序不再构建

时间:2016-05-09 12:37:39

标签: python flask ibm-cloud

我在bluemix上有一个烧瓶应用程序。它工作得很好。我在我的一个htmls中更改了一些文本(不应该与它有任何关系)。

Hadn已经检查了一段时间,但似乎它突然没有建立(重新启动后停止)

日志:

2016-05-09T12:46:48.314+0200[API/1]OUTUpdated app with guid 4ff2a7a5-9b2f-41c4-85db-282b44ad6e3e ({"state"=>"STOPPED"})
2016-05-09T12:46:50.535+0200[DEA/209]OUTGot staging request for app with id 4ff2a7a5-9b2f-41c4-85db-282b44ad6e3e
2016-05-09T12:46:57.612+0200[API/6]OUTUpdated app with guid 4ff2a7a5-9b2f-41c4-85db-282b44ad6e3e ({"state"=>"STARTED"})
2016-05-09T12:46:57.788+0200[STG/209]OUT-----> Downloaded app package (372K)
2016-05-09T12:47:00.352+0200[STG/209]OUT-----> Downloaded app buildpack cache (54M)
2016-05-09T12:47:01.138+0200[STG/0]OUT-------> Buildpack version 1.5.2
2016-05-09T12:47:10.018+0200[STG/0]OUT-----> Installing dependencies with pip
2016-05-09T12:47:10.424+0200[STG/0]OUT Collecting setuptools>=18.5 (from ipython->pandas-highcharts==0.5.2->-r requirements.txt (line 5))
2016-05-09T12:47:11.027+0200[STG/0]OUT Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
2016-05-09T12:47:11.160+0200[STG/0]OUT Found existing installation: setuptools 18.3.2
2016-05-09T12:47:11.160+0200[STG/0]OUT Installing collected packages: setuptools
2016-05-09T12:47:11.162+0200[STG/0]OUT Uninstalling setuptools-18.3.2:
2016-05-09T12:47:11.181+0200[STG/0]OUT Successfully uninstalled setuptools-18.3.2
2016-05-09T12:47:11.429+0200[STG/0]OUT Successfully installed setuptools

(从这里他们是红色的)

2016-05-09T12:47:11.444+0200[STG/0]ERRTraceback (most recent call last):
2016-05-09T12:47:11.444+0200[STG/0]ERR load_entry_point('pip==7.1.2', 'console_scripts', 'pip')()
2016-05-09T12:47:11.444+0200[STG/0]ERR File "/app/.heroku/python/bin/pip", line 9, in <module>
2016-05-09T12:47:11.445+0200[STG/0]ERR return command.main(cmd_args)
2016-05-09T12:47:11.445+0200[STG/0]ERR pip_version_check(session)
2016-05-09T12:47:11.444+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/__init__.py", line 217, in main
2016-05-09T12:47:11.445+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/outdated.py", line 102, in pip_version_check
2016-05-09T12:47:11.445+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 248, in main
2016-05-09T12:47:11.445+0200[STG/0]ERR installed_version = get_installed_version("pip")
2016-05-09T12:47:11.445+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 858, in get_installed_version
2016-05-09T12:47:11.445+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 629, in __init__
2016-05-09T12:47:11.445+0200[STG/0]ERR self.add_entry(entry)
2016-05-09T12:47:11.445+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 685, in add_entry
2016-05-09T12:47:11.445+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 2075, in find_eggs_in_zip
2016-05-09T12:47:11.446+0200[STG/0]ERR return self.egg_info and self._has(self._fn(self.egg_info, name))
2016-05-09T12:47:11.446+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 1605, in has_metadata
2016-05-09T12:47:11.445+0200[STG/0]ERR working_set = pkg_resources.WorkingSet()
2016-05-09T12:47:11.447+0200[STG/0]ERR return zip_path in self.zipinfo or zip_path in self._index()
2016-05-09T12:47:11.447+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 1843, in zipinfo
2016-05-09T12:47:11.446+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 1963, in _has
2016-05-09T12:47:11.447+0200[STG/0]ERR return self._zip_manifests.load(self.loader.archive)
2016-05-09T12:47:11.445+0200[STG/0]ERR for dist in find_distributions(entry, True):
2016-05-09T12:47:11.446+0200[STG/0]ERR if metadata.has_metadata('PKG-INFO'):
2016-05-09T12:47:11.447+0200[STG/0]ERR mtime = os.stat(path).st_mtime
2016-05-09T12:47:11.447+0200[STG/0]ERR File "/app/.heroku/python/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 1783, in load
2016-05-09T12:47:11.448+0200[STG/0]ERROSError: [Errno 2] No such file or directory: '/app/.heroku/python/lib/python2.7/site-packages/setuptools-18.3.2-py2.7.egg'
2016-05-09T12:47:11.498+0200[STG/0]OUTStaging failed: Buildpack compilation step failed
2016-05-09T12:47:11.677+0200[API/6]ERRencountered error: App staging failed in the buildpack compile phase

从错误来看,似乎错误不在我的代码中,而是在bluemix背面发生的事情。

任何可以帮我弄清楚出了什么问题的人?

我正在使用标准的bluemix python-flask样板链接到我的github,从那里推送我的代码。

编辑:回答下面的评论,尝试过。一旦我做了更改(添加我的需求文件),它就会出现同样的错误。

要求文件:

Flask==0.10.1
requests
pygal
flask_googlemaps
pandas-highcharts==0.5.2
cloudant==2.0.0b2

1 个答案:

答案 0 :(得分:1)

似乎问题是

pandas-highcharts==0.5.2

在需求文件中。

它似乎与安装setuptools-21.0.0依赖的pandas-highcharts有关。结果,setuptools-18.3.2被卸载并删除,如日志中所示:

2016-05-09T12:47:10.424+0200[STG/0]OUT 收集setuptools&gt; = 18.5(来自ipython-&gt; pandas-highcharts == 0.5.2-&gt; -r requirements.txt(第5行))

2016-05-09T12:47:11.027+0200[STG/0]OUT Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)

2016-05-09T12:47:11.160+0200[STG/0]OUT Found existing installation: setup tools 18.3.2

2016-05-09T12:47:11.160+0200[STG/0]OUT Installing collected packages: setup tools

2016-05-09T12:47:11.162+0200[STG/0]OUT 卸载setuptools-18.3.2:

2016-05-09T12:47:11.181+0200[STG/0]OUT 已成功卸载setuptools-18.3.2

之后构建复杂化失败,因为找不到setuptools-18.3.2。

2016-05-09T12:47:11.448+0200[STG/0]ERROSError: [Errno 2] 没有此类文件或目录:&#39; /app/.heroku/python/lib/python2.7/site-packages/setuptools-18.3.2-py2.7.egg& #39;

2016-05-09T12:47:11.498+0200[STG/0]OUTStaging failed: Buildpack compilation step failed
2016-05-09T12:47:11.677+0200[API/6]ERRencountered error: App staging failed in the buildpack compile phase

在查看Github上导致问题的相关源代码之后,我并不清楚。

我采用的解决方案就是删除它。相反,我使用其他东西作为情节

(如果有人知道原因,我们可以编辑它以包含原因。可能有用的知道以备将来使用)。