Could it be a bug?

If I put it under site-packages and run locally, it works. When running in 
GAE, fails.

If I put it under the modules folder (where I want to put it), it fails 
both in local and in GAE.



El martes, 25 de junio de 2013 16:00:25 UTC+2, peibol escribió:
>
> Hi there:
>
> I know there are some threads about this issue but I don't get the thing. 
> It's supposed that if I put the module into the /myapp/modules subfolder, 
> importing as usual in Python should work (eg, import mymodule or from 
> mymodule import *).
>
> I'm trying to use sympy in my app. When I install it in Python, I get my 
> app run locally. However, if I drop sympy  just in the /modules subfolder, 
> it doesn't work and, obviously, not in GAE. I've tried the deprecated local 
> import with no result.
>
> Diving into the error logs, I think custom_import is trying to import the 
> module from the wrong path. 
>
> Line 683: S"'applications.myeducenter.modules.expr'" Which is a non-sense 
> route, since it should be "applications.myeducenter.modules.*sympy.core*
> .expr" 
>
> I'm using Python 2.7 and web2py Version 
> 2.5.1-stable+timestamp.2013.06.11.08.00.05
>
> Thanks
>
> The traceback:
>
> In FILE: 
> /base/data/home/apps/s~myeduapps/2.368335999064035096/applications/myeducenter/controllers/worksheets.py
>
> Traceback (most recent call last):
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/gluon/restricted.py", 
> line 212, in restricted
>     exec ccode in environment
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/applications/myeducenter/controllers/worksheets.py",
>  line 253, in <module>
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/gluon/globals.py", 
> line 194, in <lambda>
>     self._caller = lambda f: f()
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/applications/myeducenter/controllers/worksheets.py",
>  line 68, in fractions1topdf
>     from sympy import *
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/gluon/custom_import.py",
>  line 87, in custom_importer
>     return base_importer(pname, globals, locals, fromlist, level)
>   File "applications/myeducenter/modules/sympy/__init__.py", line 49, in 
> <module>
>     from sympy.core import *
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/gluon/custom_import.py",
>  line 87, in custom_importer
>     return base_importer(pname, globals, locals, fromlist, level)
>   File "applications/myeducenter/modules/sympy/core/__init__.py", line 8, in 
> <module>
>     from expr import Expr, AtomicExpr
>   File 
> "/base/data/home/apps/s~myeduapps/2.368335999064035096/gluon/custom_import.py",
>  line 87, in custom_importer
>     return base_importer(pname, globals, locals, fromlist, level)
> ImportError: No module named expr
>
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to