FAQ
Setting up django for the first time

Any ideas what i need to look at to get this error to go away. Not
used "wsgi" before?


~/www/django/mySite.fcgi

Traceback (most recent call last):
File "./mySite.fcgi", line 19, in <module>
runfastcgi(method="threaded", daemonize="false")
File "/home1/harveywe/.local/lib/python2.6/site-packages/django/core/
servers/fastcgi.py", line 182, in runfastcgi
WSGIServer(get_internal_wsgi_application(), **wsgi_opts).run()
File "/home1/harveywe/.local/lib/python2.6/site-packages/django/core/
servers/basehttp.py", line 60, in get_internal_wsgi_application
"could not import module '%s': %s" % (app_path, module_name, e))
django.core.exceptions.ImproperlyConfigured: WSGI application
'myFirstProject.wsgi.application' could not be loaded; could not
import module 'myFirstProject.wsgi': No module named
myFirstProject.wsgi

I'm assume this explains why i'm getting "HTTP Error 500 Internal
server error"

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Search Discussions

  • Marcin Tustin at May 29, 2012 at 9:27 pm
    Maybe you should actually show us the code, and tell us about your
    environment.
    On Tue, May 29, 2012 at 10:12 PM, Harvey wrote:

    Setting up django for the first time

    Any ideas what i need to look at to get this error to go away. Not
    used "wsgi" before?


    ~/www/django/mySite.fcgi

    Traceback (most recent call last):
    File "./mySite.fcgi", line 19, in <module>
    runfastcgi(method="threaded", daemonize="false")
    File "/home1/harveywe/.local/lib/python2.6/site-packages/django/core/
    servers/fastcgi.py", line 182, in runfastcgi
    WSGIServer(get_internal_wsgi_application(), **wsgi_opts).run()
    File "/home1/harveywe/.local/lib/python2.6/site-packages/django/core/
    servers/basehttp.py", line 60, in get_internal_wsgi_application
    "could not import module '%s': %s" % (app_path, module_name, e))
    django.core.exceptions.ImproperlyConfigured: WSGI application
    'myFirstProject.wsgi.application' could not be loaded; could not
    import module 'myFirstProject.wsgi': No module named
    myFirstProject.wsgi

    I'm assume this explains why i'm getting "HTTP Error 500 Internal
    server error"

    --
    You received this message because you are subscribed to the Google Groups
    "Django users" group.
    To post to this group, send email to django-users@googlegroups.com.
    To unsubscribe from this group, send email to
    django-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/django-users?hl=en.

    --
    Marcin Tustin
    Tel: 07773 787 105

    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To post to this group, send email to django-users@googlegroups.com.
    To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
  • Harvey at Jun 25, 2012 at 1:09 pm
    Hi

    My code looks like this...see below. fails on last line.
    i.e. runfastcgi(method="threaded", daemonize="false")

    Python Code is run from this
    path /home1/harveywe/www/dj/testProject/mySite.fcgi

    environments
    PYTHONPATH=/home1/harveywe/.local/lib/python2.6/site-packages:/home1/harveywe/
    PATH=/home1/harveywe/.local/bin:/home1/harveywe/.local/usr/bin:/usr/local/jdk/
    bin:/home1/harveywe/perl5/bin:/usr/lib64/qt-3.3/bin:/home1/harveywe/perl5/bin:
    /ramdisk/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr


    This code being run on a ISP host (bluehost.com).

    Does any of this help?

    Harevy


    ########################### MY CODE ##############################
    harveywe@harveywest.co.uk [~/www/dj/testProject]# cat mySite.fcgi
    #!/usr/bin/python2.6
    import sys, os

    # Add a custom Python path.
    sys.path.insert(0, "/home1/harveywe/.local/lib/python2.6")
    sys.path.insert(13, "/home1/harveywe/django_projects/myFirstProject")


    sys.path.insert(0, "/home1/harveywe/.local/lib/python2.6/flup-1.0.2")


    # Switch to the directory of your project. (Optional.)
    # os.chdir("/home/DJANGONOOB/django_projects/myFirstProject")

    #from django.conf import settings

    #settings.DEBUG = True




    # Set the DJANGO_SETTINGS_MODULE environment variable.
    os.environ['DJANGO_SETTINGS_MODULE'] = "settings"

    from django.core.servers.fastcgi import runfastcgi
    runfastcgi(method="threaded", daemonize="false")
    #################### MY CODE END #######################################



    On Tuesday, 29 May 2012 22:12:27 UTC+1, Harvey wrote:

    Setting up django for the first time

    Any ideas what i need to look at to get this error to go away. Not
    used "wsgi" before?


    ~/www/django/mySite.fcgi

    Traceback (most recent call last):
    File "./mySite.fcgi", line 19, in <module>
    runfastcgi(method="threaded", daemonize="false")
    File "/home1/harveywe/.local/lib/python2.6/site-packages/django/core/
    servers/fastcgi.py", line 182, in runfastcgi
    WSGIServer(get_internal_wsgi_application(), **wsgi_opts).run()
    File "/home1/harveywe/.local/lib/python2.6/site-packages/django/core/
    servers/basehttp.py", line 60, in get_internal_wsgi_application
    "could not import module '%s': %s" % (app_path, module_name, e))
    django.core.exceptions.ImproperlyConfigured: WSGI application
    'myFirstProject.wsgi.application' could not be loaded; could not
    import module 'myFirstProject.wsgi': No module named
    myFirstProject.wsgi

    I'm assume this explains why i'm getting "HTTP Error 500 Internal
    server error"
    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/8emacSN1V_EJ.
    To post to this group, send email to django-users@googlegroups.com.
    To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedMay 29, '12 at 9:24p
activeJun 25, '12 at 1:09p
posts3
users2
websitedjangoproject.com

2 users in discussion

Harvey: 2 posts Marcin Tustin: 1 post

People

Translate

site design / logo © 2022 Grokbase