Hi Constantine, I did such changes because Gunicorn does not work on Windows, as the article itself states. And the psycopg2==2.5.3 does not work with Visual Studio Community 2015. Your comment made me have an idea. I'll try to deploy with psycopg2 instead of gunicorn. It is a sample blog for my portfolio, not a real one. And I need this work ready this weekend, so if it run with psycopg2, it will be ok to me.
I will try it, and inform you if it works later. Thank you. Em sexta-feira, 21 de outubro de 2016 18:25:12 UTC-2, Constantine Covtushenko escreveu: > > Hi Aline, > > I thought that an initial idea of running application with `heroku local` > is to check how it can run in heroku. > > Why did you change the Procfile in such a way? > It supposed to use it the same as for heroku. > > Can you please try with Procfile without any local specific modifications? > > Regards, > Constantine C. > > On Fri, Oct 21, 2016 at 1:14 PM, Aline C. R. Souza <[email protected] > <javascript:>> wrote: > >> Hello, Constantine, >> >> I have already followed this article and using `heroku local` the app >> runs fine. However, some things I did different: >> >> (i) I used psycopg2==2.6.2 instead of psycopg2==2.5.3, because the 2.5.3 >> version do not works with Visual Studio Community 2015. >> (ii) On my Procfile I put: 'web: python manage.py runserver 0.0.0.0:80' >> instead of 'web: python manage.py runserver 0.0.0.0:$PORT', because, for >> some reason, 0.0.0.0:$PORT catches an error of port not found, or something >> like that. >> >> I think the problem occurs only with gunicorn server. >> >> I was thinking in test the app on a linux virtual machine, using the >> gunicorn. However, I don't know how to migrate the virtual enviroment to >> the virtual machine. >> >> So, I don't know if this would be a good approach to solve the problem. >> >> Em sexta-feira, 21 de outubro de 2016 05:27:45 UTC-2, Constantine >> Covtushenko escreveu: >>> >>> Hi Aline, >>> >>> I have encountered the problem described by you as well. I am using >>> heroku for about 5 django projects. >>> >>> For some reason this problem does not exist when you run django server >>> with manage.py command. >>> >>> Try to read that heroku >>> <https://devcenter.heroku.com/articles/deploying-python#build-your-app-and-run-it-locally> >>> >>> article. Using `heroku local` command helps fix/run/check locally and after >>> all ok you safely commit and push to heroku. >>> >>> Hope that helps >>> >>> Regards, >>> Constantine C. >>> >>> On Fri, Oct 21, 2016 at 8:39 AM, Antonis Christofides < >>> [email protected]> wrote: >>> >>>> Hello, >>>> >>>> Link to the repo: https://github.com/alinecrsouza/django-blog-app >>>> >>>> >>>> that repo only contains the blog app. Could you show us the polls app? >>>> >>>> Regards, >>>> >>>> Antonis Christofideshttp://djangodeployment.com >>>> >>>> On 2016-10-20 22:49, Aline C. R. Souza wrote: >>>> >>>> Hello everybody, >>>> >>>> I am catching an error on trying to deploy my app on heroku. This is >>>> the traceback: >>>> >>>> File >>>> "/app/.heroku/python/lib/python3.5/site-packages/polls/admin.py", line 3, >>>> in <module> >>>> 2016-10-20T18:42:46.734824+00:00 app[web.1]: File >>>> "/app/.heroku/python/lib/python3.5/importlib/__init__.py", line 126, in >>>> import_module >>>> 2016-10-20T18:42:46.734830+00:00 app[web.1]: ImportError: No module >>>> named 'models' >>>> 2016-10-20T18:42:46.735201+00:00 app[web.1]: [2016-10-20 18:42:46 >>>> +0000] [7] [INFO] Worker exiting (pid: 7) >>>> 2016-10-20T18:42:46.734826+00:00 app[web.1]: from models import >>>> Poll, Choice, Vote >>>> 2016-10-20T18:42:46.736625+00:00 app[web.1]: [2016-10-20 18:42:46 >>>> +0000] [8] [ERROR] Exception in worker process >>>> >>>> The app runs normally on localhost. >>>> >>>> That is what I tried to do: I went to my virtualenv directory at >>>> site-packages/polls/ and changed all the imports to polls.models instead >>>> of >>>> .models. Then, I cleaned the cache of the polls app and the cache of the >>>> blog app (blog app uses polls app). Built my app again and ran it locally. >>>> The app looks fine. So, I tried to push to heroku and run the app, but the >>>> same error occurs. >>>> >>>> Any thoughts? >>>> >>>> Link to the repo: https://github.com/alinecrsouza/django-blog-app >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/django-users. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/8704854e-48ab-460e-8ff1-cedc427cb037%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/django-users/8704854e-48ab-460e-8ff1-cedc427cb037%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/django-users. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/cdd71b29-ab8f-3736-71b3-ded998a6b82c%40djangodeployment.com >>>> >>>> <https://groups.google.com/d/msgid/django-users/cdd71b29-ab8f-3736-71b3-ded998a6b82c%40djangodeployment.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/85de4bd9-2475-4824-a3d1-ebf06aa8e180%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/85de4bd9-2475-4824-a3d1-ebf06aa8e180%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/98e3fd0b-751c-454d-a26a-ff480dc132e1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

