local_import function randomly does not import my modules from modules
directory. The Error is:

ImportError: No module named testapp.modules.mymodule

I have this problem when i use web2py with apache (with wsgi). I have no problem when i run locally with "python web2py.py" command.
Any suggestion?
Add testapp to your PYTHONPATH.
local_import function does not work