On Wednesday, April 20, 2016 at 9:51:23 AM UTC-7, Kiran Subbaraman wrote:
>
> Downloaded Web2py for Windows: 
> http://www.web2py.com/examples/static/web2py_win.zip.
> 2.14.5-stable+timestamp.2016.04.14.03.26.16
> (Running on Rocket 1.2.6, Python 2.7.9)
> Windows 10
>
> Unable to use the redis client library (
> https://github.com/andymccurdy/redis-py) from within the application. 
> This *works *in the web2py_src edition (
> http://www.web2py.com/examples/static/web2py_src.zip). 
> 2.14.5-stable+timestamp.2016.04.14.03.26.16, (Running on Rocket 1.2.6, 
> Python 2.7.10)
>
> To view the issue, do the following:
>
>    - Import the sample app that I have created and attached
>    - visit the default page: 
>    http://127.0.0.1:8000/module_redis/default/index
>    - You should see "<type 'exceptions.ImportError'> Cannot import module 
>    'applications.module_redis.modules.redis'"
>
>
> The trace:
> web2py™ Version 2.14.5-stable+timestamp.2016.04.14.03.26.16
> Python Python 2.7.9: c:\Users\subbaraman\Downloads\web2py_win\web2py\
> web2py.exe (prefix: D:\programs\open\python27)
>

Do you have redis in your site-packages?

/dps

 

>
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
>
> Traceback (most recent call last):
>   File "c:\Users\subbaraman\Downloads\web2py_win\web2py\gluon\restricted.py", 
> line 227, in restricted
>     exec ccode in environment
>   File 
> "c:/Users/subbaraman/Downloads/web2py_win/web2py/applications/module_redis/controllers/default.py"
>  
> <http://127.0.0.1:8000/admin/default/edit/module_redis/controllers/default.py>,
>  line 11, in <module>
>     import redis_mod as rm
>   File 
> "c:\Users\subbaraman\Downloads\web2py_win\web2py\gluon\custom_import.py", 
> line 85, in custom_importer
>     modules_prefix, globals, locals, [itemname], level)
>   File "applications\module_redis\modules\redis_mod.py", line 5, in <module>
>     import redis
>   File 
> "c:\Users\subbaraman\Downloads\web2py_win\web2py\gluon\custom_import.py", 
> line 89, in custom_importer
>     raise ImportError, 'Cannot import module %s' % str(e)
> ImportError: Cannot import module 'applications.module_redis.modules.redis'
>
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to