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

  • Home
  • SEARCH
  • 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 6088079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:56:38+00:00 2026-05-23T11:56:38+00:00

I got this error messages while I am trying to deploy my django app

  • 0

I got this error messages while I am trying to deploy my django app under mod-wsgi in Apache.

[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1] mod_wsgi (pid=4152): Exception     occurred processing WSGI script 'C:/DjangoProjects/tryserver/Apache/django.wsgi'.
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1] Traceback (most recent call   last):
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\wsgi.py", line 250, in __call__
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]     self.load_middleware()
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-  packages\\django\\core\\handlers\\base.py", line 39, in load_middleware
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]     for middleware_path in settings.MIDDLEWARE_CLASSES:
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\utils\\functional.py", line 276, in __getattr__
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]     self._setup()
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py", line 42, in _setup
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]     self._wrapped = Settings(settings_module)
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py", line 87, in __init__
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 28, in import_module
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1]     raise TypeError("relative imports require the 'package' argument")
[Thu Jun 30 23:03:35 2011] [error] [client 127.0.0.1] TypeError: relative imports require the 'package' argument

This is my django.wsgi and it is in proper location.

import os
import sys

os.environ['DJANGO_SETTINGS_MODULE'] = '../tryserver/tryserver.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

What could be the problem ?

Thanks

  • 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-23T11:56:38+00:00Added an answer on May 23, 2026 at 11:56 am

    Your Problem is:

    os.environ['DJANGO_SETTINGS_MODULE'] = '../tryserver/tryserver.settings'
    

    DJANGO_SETTINGS_MODULE needs to be an importable python module that contains your settings. Django is basically going to do import ../tryserver/tryserver.settings with your current django.wsgi

    The best fix to get what you are trying to do is to add the tryserver directory to the python path. Assuming your directory layout looks something like:

    ./
        tryserver/
            tryserver/
                settings.py
        deploy/
            django.wsgi
    

    Then in your django.wsgi you could do something like:

    import os
    import sys
    
    sys.path = sys.path + ["/PATH/TO/tryserver/"] # The first one
    
    os.environ['DJANGO_SETTINGS_MODULE'] = 'tryserver.settings'
    
    import django.core.handlers.wsgi
    application = django.core.handlers.wsgi.WSGIHandler()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While installing apache, I got this error message: libtool: install: error: cannot install `libaprutil-1.la'
I got this error today when trying to open a Visual Studio 2008 project
I got this error when trying to update an image. It was a cross-thread
I got this error An error occurred while parsing EntityName. Line 1, position 61.
I got this error message and I'm not quite sure whats wrong: Exception in
I just got this error message: ... from c:/ruby/lib/ruby/gems/1.8/gems/... ... 10 levels... from c:/ruby/lib/ruby/gems/1.8/gems/...
I got this error from XCode: objc[8422]: FREED(id): message release sent to freed object=0x3b120c0
I got this error when I tried to compile an application that includes the
I got this error for a collection I am writing, but fxcop warned me
I got this error twice. it says error: redefinition of '-[SampleTableViewController tableView:cellForRowAtIndexPath:]'

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.