1
resposta

Erro ao realizar git push -m heroku master

Olá galera poderiam me ajudar? Estou tentando realizar um git push porem esta dando erro, não sei ao certo mas parece que é no arquivo css/owl.carousel.min.css eu removi esse arquivo mas o erro continua, sera que tenho que realizar todo o processo de novo apos ter removido esse arquivo css? Existe opção de mandar o codigo por imagem no forum? Alem disso pelo oque reparei o failed começou por esse arquivo css as linhas anteriores estava correndo tudo bem =/

remote:        Successfully built psycopg2 wrapt
remote:        Installing collected packages: asgiref, wrapt, typed-ast, six, lazy-object-proxy, astroid, colorama, dj-database-url, pytz, sqlparse, Django, psycopg2, whitenoise, django-heroku, isort, mccabe, psycopg2-binary, pylint, pylint-plugin-utils, pylint-django, gunicorn
remote:        Successfully installed Django-3.0.5 asgiref-3.2.7 astroid-2.3.3 colorama-0.4.3 dj-database-url-0.5.0 django-heroku-0.3.1 gunicorn-20.0.4 isort-4.3.21 lazy-object-proxy-1.4.3 mccabe-0.6.1 psycopg2-2.8.5 psycopg2-binary-2.8.5 pylint-2.4.4 pylint-django-2.0.14 pylint-plugin-utils-0.6 pytz-2019.3 six-1.14.0 sqlparse-0.3.1 typed-ast-1.4.1 whitenoise-5.0.1 wrapt-1.11.2
remote: -----> $ python manage.py collectstatic --noinput
remote:        Post-processing 'css/owl.carousel.min.css' failed!
remote:        Traceback (most recent call last):
remote:          File "manage.py", line 20, in <module>
remote:            main()
remote:          File "manage.py", line 16, in main
remote:            execute_from_command_line(sys.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
remote:            utility.execute()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 395, 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 328, 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 369, 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 187, in handle
remote:            collected = self.collect()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 133, in collect
remote:            raise processed
remote:        whitenoise.storage.MissingFileError: The file 'css/owl.video.play.png' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7efd4aaf95f8>.
remote:        The CSS file 'css/owl.carousel.min.css' references a file which could not be found:
remote:          css/owl.video.play.png
remote:        Please check the URL references in this CSS file, particularly any
remote:        relative paths which might be pointing to the wrong location.
remote:
remote:  !     Error while running '$ python 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 douglas-alura-django.
remote:
To https://git.heroku.com/douglas-alura-django.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/douglas-alura-django.git'
1 resposta

Oii Douglas, como você está? Espero que esteja bem =)

Para mandar arquivos grandes de código pelo fórum, você pode anexá-los no drive e compartilhar o link nas respostas. Já para anexar imagens pode fazer o upload delas no Imgur e também colocar o link nas respostas.

Tente executar localmente o comando que está gerando erro no deploy:

python manage.py collectstatic

Veja se irá te retornar algum erro, se sim, qual?Aparentemente há erros de referência nos arquivos estáticos que estão impossibilitando o deploy acontecer.

Fico no aguardo.