darkpixel / statuspage

A simple self-hosted status page site with an API written in Django under the BSD license
https://darkpixel.github.com/statuspage/
BSD 3-Clause "New" or "Revised" License
112 stars 23 forks source link

Heroku deploy error #26

Closed rbiswas-mirp closed 5 years ago

rbiswas-mirp commented 6 years ago

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6mpCw7/psycopg2/ when deploying to Heroku

darkpixel commented 6 years ago

Hmm...I use dokku (a heroku-like clone) personally and don't have any issues deploying. Is there any additional information you can provide that might shed light on the error?

rbiswas-mirp commented 6 years ago

can you try deploying it to heroku for testing purposes?

darkpixel commented 6 years ago

I launched three businesses in the last 12 months. I'm pretty busy at the moment. :)

rbiswas-mirp commented 6 years ago

image image image image

rbiswas-mirp commented 6 years ago

this is the log

darkpixel commented 6 years ago

Looks like the error is "Error: could not determine PostgreSQL version from 10.5".

It appears I need to upgrade the postgres module I am using (https://github.com/marcgibbons/django-rest-swagger/issues/741).

I will run some tests and get back to you soon.

rbiswas-mirp commented 6 years ago

thanks!

datamafia commented 6 years ago

Bumped into this looking to solve another problem -- wanted to add some help aspsycopg2 is changing name. More recent packages will shoot out a warning like:

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>.

So older packages may not contain the warning. I was able uninstall and reinstall and my app (not pushed for almost a year #stable)

pip uninstall psycopg2
pip install psycopg2-binary

Success on deploy.

And don't forget to freeze. Hope that helps/LMK.

darkpixel commented 6 years ago

Sorry for the delays. My 8-year-old dev workstation with 32 GB RAM and an 8-core 2.4 GHz processor died a few days ago. I've been reduced to a system with 8 GB RAM and a dual 1.9 GHz processor for the next few days until Newegg comes through with a new system. Plus my dev environment isn't set up. ;)

In addition to the psycopg2 bug, there are a few things broken in the dev branch I'm trying to clean up. I should have a push ready in the next hour.

darkpixel commented 6 years ago

The development branch should fix the issue. I also have a docker image building right now: https://hub.docker.com/r/darkpixel/statuspage/builds/

Give it a shot and let me know how it works for you and then I'll merge it into master.

rbiswas-mirp commented 6 years ago

image This is the error that pops up

darkpixel commented 6 years ago

Hmm...did database migrations apply when you deployed?

rbiswas-mirp commented 6 years ago

How to do that! please guide me

darkpixel commented 6 years ago

Take a look at your deployment log and see if you see information on database migrations being applied.

Feel free to post your deployment log and I can help you dig through it.

rbiswas-mirp commented 6 years ago

-----> Python app detected ! The latest version of Python 2 is python-2.7.15 (you are using python-2.7.9, which is unsupported). ! We recommend upgrading by specifying the latest version (python-2.7.15). Learn More: https://devcenter.heroku.com/articles/python-runtimes -----> Installing python-2.7.9 -----> Installing pip -----> Installing SQLite3 -----> Installing requirements with pip Collecting requests==2.18.4 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88kB) Collecting pyslack==0.3.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 2)) Downloading https://files.pythonhosted.org/packages/17/30/5d81a782ccf03c212df4fe141a9d06fc1e853158c03bccc0e55474fc2447/pyslack-0.3.0.tar.gz Collecting raven==6.8.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 3)) Downloading https://files.pythonhosted.org/packages/21/14/a06bcd2aa519bb659f5cf9e0b8c29158155cea7f6ce6e947d06967642df6/raven-6.8.0-py2.py3-none-any.whl (285kB) Collecting Django==1.11.13 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 4)) Downloading https://files.pythonhosted.org/packages/25/4d/c8228419346a0e84aec202a43e181afc6572b861d38f8a0306dbce6abef0/Django-1.11.13-py2.py3-none-any.whl (6.9MB) Collecting dj-database-url==0.5.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 5)) Downloading https://files.pythonhosted.org/packages/d4/a6/4b8578c1848690d0c307c7c0596af2077536c9ef2a04d42b00fabaa7e49d/dj_database_url-0.5.0-py2.py3-none-any.whl Collecting whitenoise==3.3.1 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 6)) Downloading https://files.pythonhosted.org/packages/0c/58/0f309a821b9161d0e3a73336a187d1541c2127aff7fdf3bf7293f9979d1d/whitenoise-3.3.1-py2.py3-none-any.whl Collecting sqlparse==0.2.4 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 7)) Downloading https://files.pythonhosted.org/packages/65/85/20bdd72f4537cf2c4d5d005368d502b2f464ede22982e724a82c86268eda/sqlparse-0.2.4-py2.py3-none-any.whl Collecting python-dateutil==2.7.3 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB) Collecting dj-static==0.0.6 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/2b/8f/77a4b8ec50c821193bf9682c7896f12fd0418eb3711a7d66796ede59c23b/dj-static-0.0.6.tar.gz Collecting mimeparse==0.1.3 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 10)) Downloading https://files.pythonhosted.org/packages/38/0c/7b02c30765658744acc51876781c580234cb1110296b231a3a524722f9c7/mimeparse-0.1.3.tar.gz Collecting django-avatar==4.1.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 11)) Downloading https://files.pythonhosted.org/packages/ae/82/00ee52b6b72003b945387af55410ed007c9a1b07ba8b397c7aae5a12b498/django-avatar-4.1.0.tar.gz (1.6MB) Collecting django-bootstrap3==10.0.1 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 12)) Downloading https://files.pythonhosted.org/packages/18/a8/f12d8491155c7f237084b883b8600faf722e3a46e54f17a25103b0fb9641/django-bootstrap3-10.0.1.tar.gz (40kB) Collecting django-debug-toolbar==1.9.1 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 13)) Downloading https://files.pythonhosted.org/packages/b2/ff/eb95539d31b3f3c12803c8f18cefe7f9e6f7281b059a36dbc9ee9b52c558/django_debug_toolbar-1.9.1-py2.py3-none-any.whl (206kB) Collecting django-extensions==2.0.7 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 14)) Downloading https://files.pythonhosted.org/packages/d4/b5/f141b351b49db2cb4c855cd8adbdb98cc49f3944a924ddfe51790bb46402/django_extensions-2.0.7-py2.py3-none-any.whl (217kB) Collecting django-extra-views==0.11.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 15)) Downloading https://files.pythonhosted.org/packages/3a/f0/67148a26bac647c3642d9e17ebb0b817ffe3d6b8deb7def5c1473988ae17/django-extra-views-0.11.0.tar.gz Collecting django-stronghold (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 16)) Downloading https://files.pythonhosted.org/packages/a9/69/3b7c5644dad0308dd327dece2f4368b8f8b6b72e8418b265b0065ed29cb0/django-stronghold-0.3.0.tar.gz Collecting gunicorn==19.8.1 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 17)) Downloading https://files.pythonhosted.org/packages/55/cb/09fe80bddf30be86abfc06ccb1154f97d6c64bb87111de066a5fc9ccb937/gunicorn-19.8.1-py2.py3-none-any.whl (112kB) Collecting honcho==1.0.1 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 18)) Downloading https://files.pythonhosted.org/packages/12/c2/95faf9e062e37f50fb685972692395bef019a554c08447282a81e35bf031/honcho-1.0.1-py2.py3-none-any.whl Collecting psycopg2-binary==2.7.5 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 19)) Downloading https://files.pythonhosted.org/packages/87/b3/9579bb785af9516d2d1786f5a1b7c1efdb26261a4dcf0e5ceabb436afdbb/psycopg2_binary-2.7.5-cp27-cp27m-manylinux1_x86_64.whl (2.7MB) Collecting pytz==2018.4 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 20)) Downloading https://files.pythonhosted.org/packages/dc/83/15f7833b70d3e067ca91467ca245bae0f6fe56ddc7451aa0dc5606b120f2/pytz-2018.4-py2.py3-none-any.whl (510kB) Collecting redis==2.10.6 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 21)) Downloading https://files.pythonhosted.org/packages/3b/f6/7a76333cf0b9251ecf49efff635015171843d9b977e4ffcf59f9c4428052/redis-2.10.6-py2.py3-none-any.whl (64kB) Collecting django-redis==4.9.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 22)) Downloading https://files.pythonhosted.org/packages/d5/3c/184b7a962f2aa5e49388ced9664a308b8d1b9864dc6afe7adb2a8302b5c4/django_redis-4.9.0-py2.py3-none-any.whl Collecting django-tastypie==0.14.2 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 23)) Downloading https://files.pythonhosted.org/packages/92/46/3a166f9d4fab4baf0d919755cc7223d02a48b0d4e159c89050aa1f61cd1f/django-tastypie-0.14.2.tar.gz (146kB) Collecting django-braces==1.13.0 (from -r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 24)) Downloading https://files.pythonhosted.org/packages/84/3c/fa2cca1411b456a84714efea8a2c805924eba6147e6b68e326caca9c7383/django_braces-1.13.0-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests==2.18.4->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB) Collecting chardet<3.1.0,>=3.0.2 (from requests==2.18.4->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) Collecting idna<2.7,>=2.5 (from requests==2.18.4->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB) Collecting urllib3<1.23,>=1.21.1 (from requests==2.18.4->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB) Collecting contextlib2; python_version < "3.2" (from raven==6.8.0->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 3)) Downloading https://files.pythonhosted.org/packages/a2/71/8273a7eeed0aff6a854237ab5453bc9aa67deb49df4832801c21f0ff3782/contextlib2-0.5.5-py2.py3-none-any.whl Collecting six>=1.5 (from python-dateutil==2.7.3->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl Collecting static3 (from dj-static==0.0.6->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/87/b0/9cf15108b73c4f2ffffe11d237c938f57785f55d3693d822d565432cb680/static3-0.7.0.tar.gz Collecting Pillow>=2.0 (from django-avatar==4.1.0->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 11)) Downloading https://files.pythonhosted.org/packages/86/56/14563445c372825b20ea285687a8daf0ef1c09ac0a72f30f72181c008dec/Pillow-5.2.0-cp27-cp27m-manylinux1_x86_64.whl (2.0MB) Collecting django-appconf>=0.6 (from django-avatar==4.1.0->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 11)) Downloading https://files.pythonhosted.org/packages/5b/78/726cdf3e04660560cf25f9def95b8f2736310c581dabed9adfe60154a9f8/django_appconf-1.0.2-py2.py3-none-any.whl Collecting typing; python_version < "3.5" (from django-extensions==2.0.7->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 14)) Downloading https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl Collecting python-mimeparse!=1.5,>=0.1.4 (from django-tastypie==0.14.2->-r /tmp/build_f9145944d51351265182a51ae49e15c0/requirements.txt (line 23)) Downloading https://files.pythonhosted.org/packages/26/2e/03bce213a9bf02a2750dcb04e761785e9c763fc11071edc4b447eacbb842/python_mimeparse-1.6.0-py2.py3-none-any.whl Installing collected packages: certifi, chardet, idna, urllib3, requests, pyslack, contextlib2, raven, pytz, Django, dj-database-url, whitenoise, sqlparse, six, python-dateutil, static3, dj-static, mimeparse, Pillow, django-appconf, django-avatar, django-bootstrap3, django-debug-toolbar, typing, django-extensions, django-extra-views, django-stronghold, gunicorn, honcho, psycopg2-binary, redis, django-redis, python-mimeparse, django-tastypie, django-braces Running setup.py install for pyslack: started Running setup.py install for pyslack: finished with status 'done' Running setup.py install for static3: started Running setup.py install for static3: finished with status 'done' Running setup.py install for dj-static: started Running setup.py install for dj-static: finished with status 'done' Running setup.py install for mimeparse: started Running setup.py install for mimeparse: finished with status 'done' Running setup.py install for django-avatar: started Running setup.py install for django-avatar: finished with status 'done' Running setup.py install for django-bootstrap3: started Running setup.py install for django-bootstrap3: finished with status 'done' Running setup.py install for django-extra-views: started Running setup.py install for django-extra-views: finished with status 'done' Running setup.py install for django-stronghold: started Running setup.py install for django-stronghold: finished with status 'done' Running setup.py install for django-tastypie: started Running setup.py install for django-tastypie: finished with status 'done' Successfully installed Django-1.11.13 Pillow-5.2.0 certifi-2018.8.24 chardet-3.0.4 contextlib2-0.5.5 dj-database-url-0.5.0 dj-static-0.0.6 django-appconf-1.0.2 django-avatar-4.1.0 django-bootstrap3-10.0.1 django-braces-1.13.0 django-debug-toolbar-1.9.1 django-extensions-2.0.7 django-extra-views-0.11.0 django-redis-4.9.0 django-stronghold-0.3.0 django-tastypie-0.14.2 gunicorn-19.8.1 honcho-1.0.1 idna-2.6 mimeparse-0.1.3 psycopg2-binary-2.7.5 pyslack-0.3.0 python-dateutil-2.7.3 python-mimeparse-1.6.0 pytz-2018.4 raven-6.8.0 redis-2.10.6 requests-2.18.4 six-1.11.0 sqlparse-0.2.4 static3-0.7.0 typing-3.6.6 urllib3-1.22 whitenoise-3.3.1 -----> $ python manage.py collectstatic --noinput No handlers could be found for logger "statuspage.settings" 83 static files copied to '/tmp/build_f9145944d51351265182a51ae49e15c0/static'. -----> Discovering process types Procfile declares types -> web -----> Compressing... Done: 48.7M -----> Launching... Released v4 https://arcadestatus.herokuapp.com/ deployed to Heroku

rbiswas-mirp commented 5 years ago

Please help

rbiswas-mirp commented 5 years ago

Hello please help!

darkpixel commented 5 years ago

You aren't running python manage.py migrate --no-input anywhere in your Heroku deployment.

rbiswas-mirp commented 5 years ago

Okay thanks I will try it

darkpixel commented 5 years ago

Feel free to re-open the ticket if you have trouble.