Moving to 2.4.2 did not solve the issue. What did solve it was a reorganizing of my libraries: previously I was importing libraries from a top-level directory, and now I have put all my libraries inside a new namespace, so that instead of doing:
from my_module import my_function Now I am doing: from top_namespace.my_module import my_funcion And the issues are gone. I suspect one of my libraries was conflicting with one the modules provided by web2py, but have no prove of that. On Wednesday, March 6, 2013 7:53:26 PM UTC+1, Daniel Gonzalez wrote: > > Currently running Version 2.4.1-alpha.2+timestamp.2013.01.13.13.14.47 > > And I remember that I had a similar issue, which was indeed related to the > custom importer: > https://groups.google.com/d/topic/web2py/IzhnixOivic/discussion > > It seems I am run into a similar problem again. If I find any information > I'll post it. Otherwise I'll move to 2.4.2 and see if that solves the > problems. > > On Wednesday, March 6, 2013 7:41:23 PM UTC+1, Massimo Di Pierro wrote: >> >> Which web2py version? Some changes were made to 2.4.2 to the custom >> importer. >> >> On Wednesday, 6 March 2013 12:19:32 UTC-6, Daniel Gonzalez wrote: >>> >>> Hi, >>> >>> I have this very strange issue: I am importing a module in the web2py >>> models, but the module can not be found. >>> This is only happening in one of my production hosts: the rest are ok >>> (very similar machines, similar setup). >>> If I import the module from a python shell, it works, but importing from >>> the web2py shell fails. >>> I have verified that os.environ.get('PYTHONPATH') are exactly the same >>> in both web2py shell and normal python shell. >>> >>> sys.path differ slightly: basically, in web2py shell it has the web2py >>> installation directory, and in the normal python shell it has the current >>> directory. >>> But this should not affect finding the module I want to import. So, I do >>> not understand why this one module is not being found. >>> >>> I have experienced in the past that web2py complains about a module not >>> found, when actually what happens is that importing that module causes an >>> error (for whatever reason: because an import there does not work, or >>> syntax error, or whatever). But I can not tell in this specific case if >>> that is my problem. How can I further debug this annoying issue? >>> >>> Thanks, >>> Daniel >>> >> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

