python - An error occurred importing your passenger_wsgi.py on server -


I am getting an error "There was an error importing my passenger_real" on the dreamhost server

Passenger_wsgi .pi file

  import system, OS InterP = '/ home / daimirer / books Harcrow IM / Itra / Bean / Python sys.path.append ('/ home / dramira / books .everycrave.me / flipbook /') If sys.executable! = INTERP: os.execl (INTERP, INTERP, * sys.argv) sys.path.append (os.getcwd ()) os.environ ['DJANGO_SETTINGS_MODULE'] = "Import settings" django.core.handlers.wsgi application = Django.core.handlers.wsgi.WSGIHandler ()   

I get an exact error when compiling passenger _wsgi.py

  traceback (most recent Call final): File "travel_wasfi", line 7, & lt; Module & gt; Import django.core.handlers.wsgi ImportError: a module named django.core.handlers.wsgi   

I fix passenger_wsgi.py file for other websites by working on the same server Has compiled for. I do not know what problem I am experiencing here Please help me.

Your passenger_swap looks very similar to me, which is also hosted on Dreamhost. The three differences that are standing with me:

  1. You are only adding os.getcwd () to sys.path from the current directory. In my, I add the current directory and project directory: os.path.join (os.getcwd (), 'projectname')) .
  2. Your DJANGO_SETTINGS_MODULE is called the only 'setting' I use a qualified module: 'projectname.settings'
  3. This may be a difference in Django versions - I'm at 1.7 - but at some point I had to go away application = WSGIHandler () .

    My real WSGI traffic is now: django.core.wsgi import from get_wsgi_application application = Get_wsgi_application () < / Div>

Comments

Post a Comment

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -