call-tracking-django
call-tracking-django copied to clipboard
New error when setting up on heroku
@atbaker Here is the new error
-----> Python app detected -----> Installing python-3.6.2 -----> Installing pip -----> Installing requirements with pip Collecting Django==1.8 (from -r /tmp/build_7aaf2fe3a538e93211d2215435edf738/TwilioDevEd-call-tracking-django-deba9ef/requirements.txt (line 4)) Downloading Django-1.8-py2.py3-none-any.whl (6.2MB) Collecting django-bootstrap3==6.1.0 (from -r /tmp/build_7aaf2fe3a538e93211d2215435edf738/TwilioDevEd-call-tracking-django-deba9ef/requirements.txt (line 7)) Downloading django-bootstrap3-6.1.0.tar.gz Collecting django-forms-bootstrap==3.0.1 (from -r /tmp/build_7aaf2fe3a538e93211d2215435edf738/TwilioDevEd-call-tracking-django-deba9ef/requirements.txt (line 8)) Downloading django-forms-bootstrap-3.0.1.tar.gz Collecting django-phonenumber-field==0.7.2 (from -r /tmp/build_7aaf2fe3a538e93211d2215435edf738/TwilioDevEd-call-tracking-django-deba9ef/requirements.txt (line 9)) Downloading django-phonenumber-field-0.7.2.tar.gz Collecting phonenumbers==7.0.8 (from -r /tmp/build_7aaf2fe3a538e93211d2215435edf738/TwilioDevEd-call-tracking-django-deba9ef/requirements.txt (line 10)) Downloading phonenumbers-7.0.8.tar.gz (2.1MB) Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-gbu5ivfl/phonenumbers/setup.py", line 33, in from phonenumbers import version File "/tmp/pip-build-gbu5ivfl/phonenumbers/phonenumbers/init.py", line 132, in from .phonenumbermatcher import PhoneNumberMatch, PhoneNumberMatcher, Leniency File "/tmp/pip-build-gbu5ivfl/phonenumbers/phonenumbers/phonenumbermatcher.py", line 161, in re.compile(u("(?u)(?:\p{Z}-|-\s)\s*(.+)")), File "/app/.heroku/python/lib/python3.6/re.py", line 233, in compile return _compile(pattern, flags) File "/app/.heroku/python/lib/python3.6/re.py", line 301, in _compile p = sre_compile.compile(pattern, flags) File "/app/.heroku/python/lib/python3.6/sre_compile.py", line 562, in compile p = sre_parse.parse(p, flags) File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 855, in parse p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0) File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 416, in _parse_sub not nested and not items)) File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 765, in _parse p = _parse_sub(source, state, sub_verbose, nested + 1) File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 416, in _parse_sub not nested and not items)) File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 502, in _parse code = _escape(source, this, state) File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 401, in _escape raise source.error("bad escape %s" % escape, len(escape)) sre_constants.error: bad escape \p at position 7
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gbu5ivfl/phonenumbers/ ! Push rejected, failed to compile Python app. ! Push failed
This was very painful but it seems to have something to do with with an issue using setuptools and distutils/setup.py in the same environment.
What worked for me:
- set collect static to false using
heroku config:set DISABLE_COLLECTSTATIC=1 - remove
django-phonenumber-fieldfromrequirements.txt - add latest version of
setuptoolstorequirements.txt - deploy to heroku
- set collect static to true using
heroku config:set DISABLE_COLLECTSTATIC=0 - add
django-phonenumber-fieldtorequirements.txt - deploy to heroku
Installing requirements in virtualenv on windows returns the same error
@skamensky how do you set collect static to false for an app if the app doesn't show up in heroku because it can't be built?
I found another solution.
- Edit requirements.txt
- Change the following:
phonenumbers==7.6 psycopg2