在Openshift上Git Push失败了吗?

时间:2015-08-26 19:37:54

标签: python django openshift

尝试在Openshift中git push到Django repo,从而得到以下错误。

remote: Traceback (most recent call last):
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/app-root/runtime/repo/wsgi/myproject/manage.py", line 11, in <module>
remote:     execute_from_command_line(sys.argv)
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/management/__init__.py", line 338, in execute_from_command_line
remote:     utility.execute()
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/management/__init__.py", line 330, in execute
remote:     self.fetch_command(subcommand).run_from_argv(self.argv)
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/management/base.py", line 390, in run_from_argv
remote:     self.execute(*args, **cmd_options)
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/management/base.py", line 441, in execute
remote:     output = self.handle(*args, **options)
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle
remote:     collected = self.collect()
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/staticfiles/management/commands/collectstatic.py", line 98, in collect
remote:     for path, storage in finder.list(self.ignore_patterns):
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/staticfiles/finders.py", line 112, in list
remote:     for path in utils.get_files(storage, ignore_patterns):
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/staticfiles/utils.py", line 28, in get_files
remote:     directories, files = storage.listdir(location)
remote:   File "/var/lib/openshift/55d9fa9f7628e164d400008b/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/files/storage.py", line 300, in listdir
remote:     for entry in os.listdir(path):
remote: OSError: [Errno 2] No such file or directory: '/Users/ns/ergo/wsgi/static'
remote: -------------------------
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 55d9fa9f7628e164d400008b (Error activating gear: CLIENT_ERROR: Failed to execute action hook 'deploy' for 55d9fa9f7628e164d400008b application ergo
remote: #<IO:0x00000002124290>
remote: #<IO:0x00000002124218>
remote: )
remote: Deployment completed with status: failure
remote: postreceive failed

我检查过的OSError目录(/Users/ns/ergo/wsgi/static)确实存在。发生了什么问题?

现在,如果我从deploy hook中评论以下脚本,那么git push就会成功

python "$OPENSHIFT_REPO_DIR"wsgi/myproject/manage.py collectstatic --noinput

所以静态文件导致了一些问题?

0 个答案:

没有答案