我正在尝试推送至Heroku,但出现错误

时间:2020-02-29 18:20:33

标签: python django heroku

remote: -----> Python app detected
remote: -----> Installing python-3.6.10
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: Sqlite3 successfully installed.
remote: -----> Installing requirements with pip
remote:        Collecting Django<2.2.0,>=2.1.3
remote:          Downloading Django-2.1.15-py3-none-any.whl (7.3 MB)
remote:        Collecting djangorestframework<3.10.0,>=3.9.0
remote:          Downloading djangorestframework-3.9.4-py2.py3-none-any.whl (911 kB)
remote:        Collecting psycopg2<2.8.0,>=2.7.5
remote:          Downloading psycopg2-2.7.7-cp36-cp36m-manylinux1_x86_64.whl (2.7 MB)
remote:        Collecting Pillow<5.4.0,>=5.3.0
remote:          Downloading Pillow-5.3.0-cp36-cp36m-manylinux1_x86_64.whl (2.0 MB)
remote:        Collecting flake8<3.7.0,>=3.6.0
remote:          Downloading flake8-3.6.0-py2.py3-none-any.whl (68 kB)
remote:        Collecting pytz
remote:          Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)
remote:        Collecting mccabe<0.7.0,>=0.6.0
remote:          Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
remote:        Collecting pyflakes<2.1.0,>=2.0.0
remote:          Downloading pyflakes-2.0.0-py2.py3-none-any.whl (53 kB)
remote:        Collecting pycodestyle<2.5.0,>=2.4.0
remote:          Downloading pycodestyle-2.4.0-py2.py3-none-any.whl (62 kB)
remote:        Installing collected packages: pytz, Django, djangorestframework, psycopg2, Pillow, mccabe, pyflakes, pycodestyle, flake8
remote:        Successfully installed Django-2.1.15 Pillow-5.3.0 djangorestframework-3.9.4 flake8-3.6.0 mccabe-0.6.1 psycopg2-2.7.7 pycodestyle-2.4.0 pyflakes-2.0.0 pytz-2019.3
remote:
remote: -----> $ python app/manage.py collectstatic --noinput
remote:        /app/.heroku/python/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
remote:          """)
remote:        Traceback (most recent call last):
remote:          File "app/manage.py", line 15, in <module>
remote:            execute_from_command_line(sys.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
remote:            utility.execute()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
remote:            self.fetch_command(subcommand).run_from_argv(self.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
remote:            self.execute(*args, **cmd_options)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
remote:            output = self.handle(*args, **options)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 188, in handle
remote:            collected = self.collect()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
remote:            handler(path, prefixed_path, storage)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 353, in copy_file
remote:            self.storage.save(prefixed_path, source_file)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/files/storage.py", line 49, in save
remote:            return self._save(name, content)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/files/storage.py", line 236, in _save
remote:            os.makedirs(directory)
remote:          File "/app/.heroku/python/lib/python3.6/os.py", line 210, in makedirs
remote:            makedirs(head, mode, exist_ok)
remote:          File "/app/.heroku/python/lib/python3.6/os.py", line 210, in makedirs
remote:            makedirs(head, mode, exist_ok)
remote:          File "/app/.heroku/python/lib/python3.6/os.py", line 210, in makedirs
remote:            makedirs(head, mode, exist_ok)
remote:          [Previous line repeated 1 more time]
remote:          File "/app/.heroku/python/lib/python3.6/os.py", line 220, in makedirs
remote:            mkdir(name, mode)
remote:        OSError: [Errno 30] Read-only file system: '/vol'
remote:
remote:  !     Error while running '$ python app/manage.py collectstatic --noinput'.
remote:        See traceback above for details.
remote:
remote:        You may need to update application code to resolve this error.
remote:        Or, you can disable collectstatic for this application:
remote:
remote:           $ heroku config:set DISABLE_COLLECTSTATIC=1
remote:
remote:        https://devcenter.heroku.com/articles/django-assets
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to ignand-recipe-api.
remote:
To https://git.heroku.com/ignand-recipe-api.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ignand-recipe-api.git'
ignacioandaur@mac recipe-app-api %

我是Heroku的新手,所以任何帮助都将非常有用,因此我正在尝试推进API的构建。它基于Python,Django,Django Framework,Postgres,Docker,并使用Travis CI进行linting和单元测试,一切都在测试侧和本地计算机上顺利进行。我是编程的新手,所以我正在查看错误,并看到Heroku给我的很多选择,但是我不确定通过更新它是否可以解决问题,因为它在我运行测试时曾经破坏了我的API使用python的更新版本。 这是该项目的我的GitHub:https://github.com/rawfire/recipe-app-api

0 个答案:

没有答案