Do you touch sys.path in your code?

On Sep 23, 3:21 pm, Necati Demir <[email protected]> wrote:
> I say "randomly" because
>
> When i refresh page, it works. And another refresh; it gives error:
> ImportError: No module named testapp.modules.mymodule
> With another page refresh it works bu if your unlucky it gives error
> again.
>
> I did not found any patterns.
> But I noticed something; when it starts to give errors, I restart
> apache* and I do not get errors for some time (say 1 hour).
>
> * I use apache+mod_wsgi
>
> On Sep 23, 5:08 pm, Massimo Di Pierro <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > True it is deprecated but still, it should work. What do you me
> > "randomly does not work". Is this for a specific module or app?
>
> > On Sep 23, 8:50 am, Anthony <[email protected]> wrote:
>
> > > As of version 1.96.1, local_import() has been deprecated. You should be 
> > > able
> > > to do:
>
> > > import mymodule
>
> > > and it will look in your application's /modules folder before checking
> > > sys.path.
> > > Anthony
>
> > > On Friday, September 23, 2011 3:11:08 AM UTC-4, Necati Demir wrote:
>
> > > > Hello,
>
> > > > local_import function randomly does not import my modules from modules
> > > > directory.
> > > > I have this problem when i use web2py with apache (with wsgi).
>
> > > > Any suggestion?

Reply via email to