I figured out the first problem listed above.  It wasn't related to
file permissions, but I want to document it here since if I hit it
someone else is likely to hit it too.

The problem was because I was writing application import statements
incorrectly.  For example, I was saying:

    from phonemechart.views import *

This worked on my development machine but failed in deployment.  If I
change this to:

    from lingshare.phonemechart.views import *

everything works.

Lesson learned: write import statements in application files relative
to the entire site instead of relative to the application.

I'm still confused about why it worked on my development machine
because the relative sys.paths don't appear to be set any differently
there.  I also tried uncommenting the os.chdir("/somepath/web-
interface/lingshare") line in my .fcgi file, but this did not fix the
problem.

Thanks for your suggestion about permissions.  I probably have some of
those problems in here too. :-)


On Sep 30, 10:00 am, Karen Tracey <[email protected]> wrote:
> On Wed, Sep 30, 2009 at 12:47 PM, W.P. McNeill <[email protected]> wrote:
>
> > Because this appears to be a problem with load paths, I inserted code
> > at the top of phonemechart/urls.py just above the import statements to
> > write out the system path.
>
> > import sys
>
> > f = open('/tmp/pypath', 'w')
> > f.write("Path is: %s" % sys.path)
> > f.close
>
> > from django.conf.urls.defaults import *
> > ...
>
> > The file in /tmp/mypath shows that "/somepath/web-interface/lingshare"
> > is on the head of the sys.path as it should be.
>
> > I'm completely blocked.  Can someone give me an idea of where to start
> > debugging next?
>
> If you are sure the paths are set correctly, then the next thing to check is
> permissions.  Does the web server process have the right permissions to
> access the files?
>
> Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to