Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-28 Thread Graham Dumpleton
In '/home/seb/MAIN/seoconquer', can you do:

  ls -las

  ls -las mvc

and post the output.

If you are concerned about revealing details send it to my email
direct.

Graham

On May 29, 7:19 am, Chris Seberino  wrote:
> On May 27, 6:56 pm, Graham Dumpleton 
> wrote:
>
> > You also need to add '/home/seb/MAIN/seoconquer'. Read:
>
> >  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
>
> I tried both versions of the wsgi script on your blog. And I still get
> this same error.
>
> ImportError: No module named mvc
>
> I think the problem is this line in settings.py where it can't find
> seoconquer.mvc to load.
>
> I printed the vars on your blog from withing my settings.py if that
> helps...
>
> __name__ =seoconquer.settings
> __file__ =/home/seb/MAIN/seoconquer/settings.py
> os.getcwd() =/home/www
> os.curdir =.
> sys.path =['/home/seb/MAIN', '/home/seb/MAIN/seoconquer',...etc.]
> sys.modules.keys() =['django.utils.text', 'decimal',
> 'django.core.django',...etc.]
> sys.modules.has_key('seoconquer') =True
>
> Notice that both necessary paths are in sys.path?!?!!?
>
> cs

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-28 Thread Chris Seberino
On May 27, 6:56 pm, Graham Dumpleton 
wrote:
> You also need to add '/home/seb/MAIN/seoconquer'. Read:
>
>  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

I tried both versions of the wsgi script on your blog. And I still get
this same error.

ImportError: No module named mvc

I think the problem is this line in settings.py where it can't find
seoconquer.mvc to load.

I printed the vars on your blog from withing my settings.py if that
helps...

__name__ =seoconquer.settings
__file__ =/home/seb/MAIN/seoconquer/settings.py
os.getcwd() =/home/www
os.curdir =.
sys.path =['/home/seb/MAIN', '/home/seb/MAIN/seoconquer',...etc.]
sys.modules.keys() =['django.utils.text', 'decimal',
'django.core.django',...etc.]
sys.modules.has_key('seoconquer') =True

Notice that both necessary paths are in sys.path?!?!!?

cs

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Graham Dumpleton


On May 28, 8:35 am, Chris Seberino  wrote:
> On May 27, 10:51 am, Nuno Maltez  wrote:
>
> > > ImportError: No module named mvc
>
> > What's the "mvc" module? Python can't seem to find it. Is it in your
> > python path?
>
> My project is called seoconquer.
> My app is called mvc.
> My absolute directory path to mvc is /home/seb/MAIN/seoconquer/mvc.
>
> I have /home/seb/MAIN added to path in the wsgi file.  (See above.)

You also need to add '/home/seb/MAIN/seoconquer'. Read:

  http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

The __init__.py file in 'apache' subdirectory where WSGI script file
is not needed and will not do anything.

Graham

> I'm trying to load the mvc app in my settings file with INSTALLED_APPS
> = (, "seoconquer.mvc")
>
> Here is my settings.py..
>
> # Contains the configuration settings.
>
> import os
>
> DEBUG = True
>
> DATABASE_NAME   = "seoconquer"
> DATABASE_USER   = "seb"
> DATABASE_ENGINE = "django.db.backends.mysql"
> TEMPLATE_DIRS   = ("/home/seb/MAIN/seoconquer/mvc/views",)
> ROOT_URLCONF    = DATABASE_NAME + "." + "urls"
> LOGIN_URL       = "sign_in"
> INSTALLED_APPS  = ("django.contrib.auth",
>                    "django.contrib.contenttypes",
>                    "django.contrib.sessions",
>                    "seoconquer.mvc")
>
> cs

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Chris Seberino
On May 27, 10:51 am, Nuno Maltez  wrote:
> > ImportError: No module named mvc
>
> What's the "mvc" module? Python can't seem to find it. Is it in your
> python path?

My project is called seoconquer.
My app is called mvc.
My absolute directory path to mvc is /home/seb/MAIN/seoconquer/mvc.

I have /home/seb/MAIN added to path in the wsgi file.  (See above.)

I'm trying to load the mvc app in my settings file with INSTALLED_APPS
= (, "seoconquer.mvc")

Here is my settings.py..

# Contains the configuration settings.

import os

DEBUG = True

DATABASE_NAME   = "seoconquer"
DATABASE_USER   = "seb"
DATABASE_ENGINE = "django.db.backends.mysql"
TEMPLATE_DIRS   = ("/home/seb/MAIN/seoconquer/mvc/views",)
ROOT_URLCONF= DATABASE_NAME + "." + "urls"
LOGIN_URL   = "sign_in"
INSTALLED_APPS  = ("django.contrib.auth",
   "django.contrib.contenttypes",
   "django.contrib.sessions",
   "seoconquer.mvc")

cs

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Nuno Maltez
> ImportError: No module named mvc

What's the "mvc" module? Python can't seem to find it. Is it in your
python path?

Nuno


On Thu, May 27, 2010 at 4:20 PM, Chris Seberino  wrote:
>
> I fixed the path issue that was causing the spinning but now I'm back
> to getting import errors even with __init__.py in my apache
> directory.  Here is the exact error from Apache's error.log.
>
> ...
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
> _default = translation(settings.LANGUAGE_CODE)
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]   File "/
> usr/lib/pymodules/python2.6/django/utils/translation/trans_real.py",
> line 194, in translation
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
> default_translation = _fetch(settings.LANGUAGE_CODE)
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]   File "/
> usr/lib/pymodules/python2.6/django/utils/translation/trans_real.py",
> line 180, in _fetch
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]     app =
> import_module(appname)
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]   File "/
> usr/lib/pymodules/python2.6/django/utils/importlib.py", line 35, in
> import_module
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
> __import__(name)
> [Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
> ImportError: No module named mvc
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread backdoc
Check your apache logs.

On Thu, May 27, 2010 at 10:06 AM, Chris Seberino wrote:

> On May 25, 9:03 pm, Kenneth Gonsalves  wrote:
> > you need to add the path to the *parent* directory of your project, and
> your
> > project should have __init__.py in every folder where there are python
> files
>
> Thanks.  I added __init__.py to an apache directory I created in my
> project directory that includes the wsgi file.
> Now Apache does NOT give me an error.  Rather, now Apache just spins
> and spins in some infinite loop never loading my django web page!?!?
>
> No errors appear in the Apache error.log because it just spins waiting
> to finish something.
>
> 
>
> Here is my wsgi file.
> 
>
> import sys
> sys.path.append("/home/seb/MAIN")
>
> import django.core.handlers.wsgi
> import os
>
> os.environ["DJANGO_SETTINGS_MODULE"] = "seoconquer.settings"
> application  =
> django.core.handlers.wsgi.WSGIHandler()
>
>
> Here is relevant part of my Apache config inside my vhosts..
> 
>
>WSGIDaemonProcess seoconquer.com threads=25
>WSGIProcessGroup  seoconquer.com
>
> WSGIScriptAlias   /
> \
>  /home/seb/MAIN/seoconquer/apache/
> application.wsgi
>
>Order Allow,Deny
>Allow from All
>
>
>
> Any help still greatly appreciated as always.
>
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Chris Seberino

I fixed the path issue that was causing the spinning but now I'm back
to getting import errors even with __init__.py in my apache
directory.  Here is the exact error from Apache's error.log.

...
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
_default = translation(settings.LANGUAGE_CODE)
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]   File "/
usr/lib/pymodules/python2.6/django/utils/translation/trans_real.py",
line 194, in translation
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
default_translation = _fetch(settings.LANGUAGE_CODE)
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]   File "/
usr/lib/pymodules/python2.6/django/utils/translation/trans_real.py",
line 180, in _fetch
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130] app =
import_module(appname)
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]   File "/
usr/lib/pymodules/python2.6/django/utils/importlib.py", line 35, in
import_module
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
__import__(name)
[Thu May 27 10:18:18 2010] [error] [client 99.159.221.130]
ImportError: No module named mvc

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Chris Seberino
On May 25, 9:03 pm, Kenneth Gonsalves  wrote:
> you need to add the path to the *parent* directory of your project, and your
> project should have __init__.py in every folder where there are python files

Thanks.  I added __init__.py to an apache directory I created in my
project directory that includes the wsgi file.
Now Apache does NOT give me an error.  Rather, now Apache just spins
and spins in some infinite loop never loading my django web page!?!?

No errors appear in the Apache error.log because it just spins waiting
to finish something.



Here is my wsgi file.


import sys
sys.path.append("/home/seb/MAIN")

import django.core.handlers.wsgi
import os

os.environ["DJANGO_SETTINGS_MODULE"] = "seoconquer.settings"
application  =
django.core.handlers.wsgi.WSGIHandler()


Here is relevant part of my Apache config inside my vhosts..


WSGIDaemonProcess seoconquer.com threads=25
WSGIProcessGroup  seoconquer.com
 
WSGIScriptAlias   /
\
  /home/seb/MAIN/seoconquer/apache/
application.wsgi

Order Allow,Deny
Allow from All



Any help still greatly appreciated as always.

Chris

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-25 Thread Graham Dumpleton


On May 26, 12:03 pm, Kenneth Gonsalves  wrote:
> On Wednesday 26 May 2010 03:52:16 Chris Seberino wrote:
>
> > I tried adding paths to sys.path in the wsgi file.
>
> you need to add the path to the *parent* directory of your project, and your
> project should have __init__.py in every folder where there are python files

And the directories/files must be readable by the user that Apache is
running the application as, ie., the Apache user, if you haven't used
daemon mode and run it as a different user.

Graham

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



Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-25 Thread Kenneth Gonsalves
On Wednesday 26 May 2010 03:52:16 Chris Seberino wrote:
> I tried adding paths to sys.path in the wsgi file.
> 

you need to add the path to the *parent* directory of your project, and your 
project should have __init__.py in every folder where there are python files
-- 
Regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC

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



mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-25 Thread Chris Seberino
I can successfully run a toy WSGI app with my Apache/mod_wsgi set up.

When I try to run my Django app with mod_wsgi it can't ever find the
modules to load and Apache's error.log gives ImportError's.

I tried adding paths to sys.path in the wsgi file.

Not what else to try.

cs

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