Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 870403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:28:09+00:00 2026-05-15T10:28:09+00:00

I’m running a django app through fcgi on my school’s shared hosting system. Everything

  • 0

I’m running a django app through fcgi on my school’s shared hosting system. Everything works initially (standard start page shows when I view the directory with index.fcgi) but when I add a module and try to import, I get the following error. The same code works when I run on my local machine.

[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr: Traceback (most recent call last):
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/flup/server/fcgi_base.py", line 558, in run
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     protocolStatus, appStatus = self.server.handler(self)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/flup/server/fcgi_base.py", line 1116, in handler
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     result = self.application(environ, start_response)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     response = self.get_response(request)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 134, in get_response
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return self.handle_uncaught_exception(request, resolver, exc_info)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 154, in handle_uncaught_exception
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return debug.technical_500_response(request, *exc_info)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/views/debug.py", line 40, in technical_500_response
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     html = reporter.get_traceback_html()
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/views/debug.py", line 114, in get_traceback_html
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return t.render(c)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/__init__.py", line 178, in render
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return self.nodelist.render(context)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     bits.append(self.render_node(node, context))
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/debug.py", line 81, in render_node
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     raise wrapped
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr: TemplateSyntaxError: Caught an exception while rendering: No module named students
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr: Original Traceback (most recent call last):
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/debug.py", line 71, in render_node
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     result = node.render(context)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/debug.py", line 87, in render
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     output = force_unicode(self.filter_expression.resolve(context))
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/__init__.py", line 572, in resolve
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     new_obj = func(obj, *arg_vals)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/template/defaultfilters.py", line 687, in date
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return format(value, arg)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/dateformat.py", line 269, in format
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return df.format(format_string)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/dateformat.py", line 30, in format
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     pieces.append(force_unicode(getattr(self, piece)()))
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/dateformat.py", line 175, in r
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return self.format('D, j M Y H:i:s O')
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/dateformat.py", line 30, in format
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     pieces.append(force_unicode(getattr(self, piece)()))
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/encoding.py", line 71, in force_unicode
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     s = unicode(s)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 201, in __unicode_cast
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return self.__func(*self.__args, **self.__kw)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 62, in ugettext
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return real_ugettext(message)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 286, in ugettext
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     return do_translate(message, 'ugettext')
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 276, in do_translate
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     _default = translation(settings.LANGUAGE_CODE)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     default_translation = _fetch(settings.LANGUAGE_CODE)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 180, in _fetch
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     app = import_module(appname)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:   File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr:     __import__(name)
[Fri Jun 11 04:45:30 2010] [warn] mod_fcgid: stderr: ImportError: No module named students

Two questions. One, it seems like the same error as this but I can’t figure out what to add to my pythonpath. Here’s the contents of my index.fcgi. I tried executing

sys.path.insert(0, "/keone/Scripts/django/resume/students")

but that didn’t help.

#!/usr/bin/env python
import sys, os, time, threading, django.utils.autoreload
sys.path.insert(0, "/keone/Scripts/django")
os.chdir("/keone/Scripts/django/resume")
os.environ['DJANGO_SETTINGS_MODULE'] = "resume.settings"

def reloader_thread():
  while True:
    if django.utils.autoreload.code_changed():
      os._exit(3)
    time.sleep(1)
t = threading.Thread(target=reloader_thread)
t.daemon = True
t.start()

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

Two, how do I change the fcgi file to close standard output and standard error and reopen them to a different file? I had to get a sysadmin to get a snippet out of the master log, and I can’t count on this consistently.

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:28:10+00:00Added an answer on May 15, 2026 at 10:28 am
    1. Does sys.path.insert(0, "/keone/Scripts/django/resume/") work? I assume everything is working fine in a runserver.

    2. You can pass in outlog and errlog to runfastcgi. http://code.djangoproject.com/browser/django/trunk/django/core/servers/fastcgi.py?rev=10345#L21

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.