Hi, I have installed OSQA on dreamhost as per wiki suggestions on osqa.net and everything went well until last step. When I type the domain name on browser it shows "An error occurred importing your passenger_wsgi.py". I have tried every possible path to python source but no success. Please help me in this regard,

My passenger_wsgi.py file is as follows

import sys, os
INTERP = "/home/myusername/local/lib/python2.5"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
sys.path.append("/home/myusername/domain name")
sys.path.append("/home/myusername/domain name/osqa")
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
from paste.exceptions.errormiddleware import ErrorMiddleware
def testapplication(environ, start_response):
   status = '200 OK'
   output = 'Hello World! Running Python version ' + sys.version + '\\n\\n'
   response_headers = [('Content-type', 'text/plain'),
                       ('Content-Length', str(len(output)))]
   # to test paste's error catching prowess, uncomment the following line
   #while this function is the "application"
   raise("error")
   start_response(status, response_headers)
   return [output]
application = ErrorMiddleware(application, debug=True)

Please Help Thanks

asked 20 May '11, 11:16

subrat's gravatar image

subrat
60579
accept rate: 0%

edited 20 May '11, 11:34

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674


Those bits that say "/home/myusername/" and "/home/myusername/domain name" - are they actually like that, verbatim? Or have you put in the real path to your home directory? For example, if your username is subrat and your domain name is subratshome.com, those lines should be:

INTERP = "/home/subrat/local/lib/python2.5"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
sys.path.append("/home/subrat/subratshome.com")
sys.path.append("/home/subrat/subratshome.com/osqa")
link

answered 20 May '11, 11:37

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674
accept rate: 21%

Yes, I have replaced those verbatim with real path names.

link

answered 20 May '11, 11:57

subrat's gravatar image

subrat
60579
accept rate: 0%

ok. If you can SSH in on Dreamhost, please do that, start a python session, and then execute those lines in your passenger_wsgi.py file one by one to see where the problem is. Also, check your server logs for any clues

(20 May '11, 12:30) Andrew_S ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×298
×113
×16
×12
×3

Asked: 20 May '11, 11:16

Seen: 951 times

Last updated: 21 May '11, 04:16

powered by OSQA