jpf / sms-via-email

Using SendGrid and Twilio to send and receive SMS messages via email.
23 stars 27 forks source link

failing at phonenumbers pip build #3

Open Mgarcia1983 opened 7 years ago

Mgarcia1983 commented 7 years ago

@jpf -----> Python app detected

-----> Installing python-3.6.1

-----> Installing pip

-----> Installing requirements with pip

   Collecting Flask==0.10.1 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 1))

     Downloading Flask-0.10.1.tar.gz (544kB)

   Collecting Jinja2==2.7.2 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 2))

     Downloading Jinja2-2.7.2.tar.gz (378kB)

   Collecting MarkupSafe==0.19 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 3))

     Downloading MarkupSafe-0.19.tar.gz

   Collecting Werkzeug==0.9.4 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 4))

     Downloading Werkzeug-0.9.4.tar.gz (1.1MB)

   Collecting gunicorn==18.0 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 5))

     Downloading gunicorn-18.0-py33-none-any.whl (93kB)

   Collecting httplib2==0.8 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 6))

     Downloading httplib2-0.8.zip (116kB)

   Collecting itsdangerous==0.23 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 7))

     Downloading itsdangerous-0.23.tar.gz (46kB)

   Collecting mock==1.0.1 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 8))

     Downloading mock-1.0.1.zip (861kB)

   Collecting nose==1.3.1 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 9))

     Downloading nose-1.3.1.tar.gz (274kB)

   Collecting phonenumbers==6.0.0 (from -r /tmp/build_70ee1d3fb189c9c5f8e2ca503ecb1898/Mgarcia1983-sms-via-email-1-423d2dc/requirements.txt (line 10))

     Downloading phonenumbers-6.0.0.tar.gz (1.7MB)

       Complete output from command python setup.py egg_info:

       Traceback (most recent call last):

         File "<string>", line 1, in <module>

         File "/tmp/pip-build-9yezqcyi/phonenumbers/setup.py", line 33, in <module>

           from phonenumbers import __version__

         File "/tmp/pip-build-9yezqcyi/phonenumbers/phonenumbers/__init__.py", line 130, in <module>

           from .phonenumbermatcher import PhoneNumberMatch, PhoneNumberMatcher, Leniency

         File "/tmp/pip-build-9yezqcyi/phonenumbers/phonenumbers/phonenumbermatcher.py", line 161, in <module>

           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 856, in parse

           p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)

         File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 415, in _parse_sub

           itemsappend(_parse(source, state, verbose))

         File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 763, in _parse

           p = _parse_sub(source, state, sub_verbose)

         File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 415, in _parse_sub

           itemsappend(_parse(source, state, verbose))

         File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 501, 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-9yezqcyi/phonenumbers/

! Push rejected, failed to compile Python app.

! Push failed

Mgarcia1983 commented 7 years ago

@jpf

darkzbaron commented 7 years ago

solved with running Python 2.7 on heroku

LPX55 commented 6 years ago

@darkzbaron I'm having the same issue. How did you set it so that 2.7 is installed instead of 3?

bballjoe12 commented 5 years ago

@darkzbaron Could you expand on how you set it to python 2.7? I can't seem to get anything to work!

darkzbaron commented 5 years ago

I'll get back to you once I get my head around this.

bobpiesz commented 4 years ago

Put that attatched "runtime.txt" file in the folder /sms-via-email

Make sure the update becomes registered when pushed: Run git commit -am "setting python runtime"

Push it it: git push heroku master

...or do it manually

In your /sms-via-email/ directory create a text file named "runtime.txt" (without the " ")

Inside that txt file put the following line, and that line ONLY:

python-2.7.17

As to why this works, I have no damn idea lol. I'm rather new with python, but I'm assuming something change after 2.7 to the source. runtime.txt

balusreekanth commented 2 years ago

Use heroku stack 18 as heroku stack 20 does not support python 2.X any more . Then use python-2.7.18 in runtime.txt in project root directory .