2017-10-27 14 views
0

현재 Heroku의 'Getting Started With Python'자습서와 함께 진행 중입니다. 나는 아래에 붙여 넣으로 나는, 배포에 같은 문제로 실행 계속 :Heroku 배포 문제 (원격 거부 됨) 마스터 -> 마스터 (수신 거부 후 수신 거부 됨) 오류 : 일부 참조를 푸시하지 못했습니다.

이미 주사위 내 설치 도구를 업데이트하고 여기에 본 적이 몇 가지 다른 기사의 조언을 따랐습니다
$ git push heroku master 
Counting objects: 312, done. 
Delta compression using up to 8 threads. 
Compressing objects: 100% (276/276), done. 
Writing objects: 100% (312/312), 84.34 KiB | 2.34 MiB/s, done. 
Total 312 (delta 130), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Python app detected 
remote: -----> Installing python-3.6.2 
remote: -----> Installing pip 
remote: -----> Installing requirements with pip 
remote:  Collecting antiorm==1.2.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 1)) 
remote:   Downloading antiorm-1.2.1.tar.gz (171kB) 
remote:  Collecting appengine==1.8.0.2 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 2)) 
remote:   Downloading appengine-1.8.0.2.tar.gz 
remote:  Collecting astroid==1.4.9 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 3)) 
remote:   Downloading astroid-1.4.9-py2.py3-none-any.whl (213kB) 
remote:  Collecting autopep8==1.3.2 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 4)) 
remote:   Downloading autopep8-1.3.2-py2.py3-none-any.whl (42kB) 
remote:  Collecting Babel==2.4.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 5)) 
remote:   Downloading Babel-2.4.0-py2.py3-none-any.whl (6.8MB) 
remote:  Collecting backports.functools-lru-cache==1.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 6)) 
remote:   Downloading backports.functools_lru_cache-1.3-py2.py3-none-any.whl 
remote:  Collecting backports.shutil-get-terminal-size==1.0.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 7)) 
remote:   Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl 
remote:  Collecting bcrypt==3.1.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 8)) 
remote:   Downloading bcrypt-3.1.3-cp36-cp36m-manylinux1_x86_64.whl (54kB) 
remote:  Collecting beautifulsoup4==4.5.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 9)) 
remote:   Downloading beautifulsoup4-4.5.3-py3-none-any.whl (85kB) 
remote:  Collecting bleach==2.0.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 10)) 
remote:   Downloading bleach-2.0.0-py2.py3-none-any.whl 
remote:  Collecting blinker==1.4 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 11)) 
remote:   Downloading blinker-1.4.tar.gz (111kB) 
remote:  Collecting certifi==2017.7.27.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 12)) 
remote:   Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB) 
remote:  Collecting cffi==1.9.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 13)) 
remote:   Downloading cffi-1.9.1-cp36-cp36m-manylinux1_x86_64.whl (398kB) 
remote:  Collecting chardet==3.0.4 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 14)) 
remote:   Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB) 
remote:  Collecting click==6.7 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 15)) 
remote:   Downloading click-6.7-py2.py3-none-any.whl (71kB) 
remote:  Collecting colorama==0.3.7 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 16)) 
remote:   Downloading colorama-0.3.7-py2.py3-none-any.whl 
remote:  Collecting configparser==3.5.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 17)) 
remote:   Downloading configparser-3.5.0.tar.gz 
remote:  Collecting coverage==4.4.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 18)) 
remote:   Downloading coverage-4.4.1-cp36-cp36m-manylinux1_x86_64.whl (196kB) 
remote:  Collecting db==0.1.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 19)) 
remote:   Downloading db-0.1.1.tar.gz 
remote:  Collecting decorator==4.0.11 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 20)) 
remote:   Downloading decorator-4.0.11-py2.py3-none-any.whl 
remote:  Collecting distribute (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 21)) 
remote:   Downloading distribute-0.7.3.zip (145kB) 
remote:   Complete output from command python setup.py egg_info: 
remote:   Traceback (most recent call last): 
remote:    File "<string>", line 1, in <module> 
remote:    File "/tmp/pip-build-zc0gylhz/distribute/setuptools/__init__.py", line 2, in <module> 
remote:    from setuptools.extension import Extension, Library 
remote:    File "/tmp/pip-build-zc0gylhz/distribute/setuptools/extension.py", line 5, in <module> 
remote:    from setuptools.dist import _get_unpatched 
remote:    File "/tmp/pip-build-zc0gylhz/distribute/setuptools/dist.py", line 7, in <module> 
remote:    from setuptools.command.install import install 
remote:    File "/tmp/pip-build-zc0gylhz/distribute/setuptools/command/__init__.py", line 8, in <module> 
remote:    from setuptools.command import install_scripts 
remote:    File "/tmp/pip-build-zc0gylhz/distribute/setuptools/command/install_scripts.py", line 3, in <module> 
remote:    from pkg_resources import Distribution, PathMetadata, ensure_directory 
remote:    File "/tmp/pip-build-zc0gylhz/distribute/pkg_resources.py", line 1518, in <module> 
remote:    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) 
remote:   AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' 
remote: 
remote:   ---------------------------------------- 
remote:  Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zc0gylhz/distribute/ 
remote: !  Push rejected, failed to compile Python app. 
remote: 
remote: !  Push failed 

. 정확한 문제를 찾을 수 없어서 거기에 넣고 싶었습니다.

도움을 주셔서 감사합니다.

+0

$ git push heroku master를 실행하기 전에 $ git pull – sanjeev51

답변

1

"remote :"로 시작하는 줄은 원격 저장소의 pre-receive 후크에 의해 반향됩니다. 원격 저장소는 푸시를 수락하기 전에 파일을 검사하기 위해 후크를 실행합니다. 파일을 작성/구문 분석하려고 시도하면 오류 AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'이 발생합니다. 다음 푸시하기 전에 오류를 수정해야합니다 (pkg_resources.py, line 1518). 수정 후 마지막 커밋을 수정할 수 있습니다. 후크가 모든 커밋을 검사하는 경우 커밋을 체크 아웃 한 후에 파일에 빌드/구문 분석 오류가 없어야합니다.

+0

나는 서버가 모든 * commit을 빌드하려고 시도하지 않기를 바랄 것이다.하지만 가능한 일인가? 불필요한 많은 프로세서 성능과 비슷합니다. – JDB

+0

@JDB 모든 커밋이 작성 되더라도 낭비되는 것은 아닙니다. 특히 팀워크에서 작동하지 않는 커밋을 체크 아웃하는 것은 짜증나고 좌절 할 것입니다. 더 일찍 피할 수 있었던 오류를 수정하는 데 여분의 시간과 노력이 소비 될 것입니다. 빌드 프로시 저는 자원을 절약하도록 최적화 될 수 있습니다. – ElpieKay

+0

나는 그것이 어떤 지점과 팀의 워크 플로우에 달려 있다고 생각한다. 우리 팀은 일반적으로 한 개발자에게 속한 문제 분기를 사용합니다. 우리는 빌드를 실행하지만 마지막 커밋이있을 때만 푸시됩니다. 그런 다음 마스터와 병합 할 때 문제가 단일 커밋으로 채워집니다. 다른 팀은 자체 워크 플로를 가질 수 있습니다. – JDB