still got an error for store session in redis after update the
*_scaffold/controllers.py*
...
elif settings.SESSION_TYPE == 'redis':
import redis
host, port = settings.REDIS_SERVER.split(':')
conn = redis.Redis(host=host, port=int(port))
*conn**.set = lambda key, value, expire, cs=conn.set, ct=conn.ttl:
(cs(key,value), ct(expiration))*
session = Session(secret=settings.SESSION_SECRET_KEY, storage=conn)
...
not tested the memcached again, since, seems it's not updated yet.
*test redis session without password in redis.conf*
ERROR:root:Traceback (most recent call last):
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 325, in
wrapper
[obj.on_success() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 325, in
<listcomp>
[obj.on_success() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 274, in
on_success
self.save()
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 250, in save
self.storage.set(cookie_data, json.dumps(self.local.data), self.
expiration)
File
"/Users/sugizo/learn/python/web3py/applications/_scaffold/controllers.py",
line 18, in <lambda>
conn.set = lambda key, value, expire, cs=conn.set, ct=conn.ttl: (cs(key,
value), ct(expiration))
NameError: name 'expiration' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 353, in
wrapper
ret = func(*func_args, **func_kwargs)
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 328, in
wrapper
[obj.on_error() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 328, in
<listcomp>
[obj.on_error() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 270, in
on_error
self.save()
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 250, in save
self.storage.set(cookie_data, json.dumps(self.local.data), self.
expiration)
File
"/Users/sugizo/learn/python/web3py/applications/_scaffold/controllers.py",
line 18, in <lambda>
conn.set = lambda key, value, expire, cs=conn.set, ct=conn.ttl: (cs(key,
value), ct(expiration))
NameError: name 'expiration' is not defined
id= 6
*test redis session with password in redis.conf*
ERROR:root:Traceback (most recent call last):
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 325, in
wrapper
[obj.on_success() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 325, in
<listcomp>
[obj.on_success() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 274, in
on_success
self.save()
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 250, in save
self.storage.set(cookie_data, json.dumps(self.local.data), self.
expiration)
File
"/Users/sugizo/learn/python/web3py/applications/_scaffold/controllers.py",
line 18, in <lambda>
conn.set = lambda key, value, expire, cs=conn.set, ct=conn.ttl: (cs(key,
value), ct(expiration))
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/client.py"
, line 1451, in set
return self.execute_command('SET', *pieces)
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/client.py"
, line 775, in execute_command
return self.parse_response(connection, command_name, **options)
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/client.py"
, line 789, in parse_response
response = connection.read_response()
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/connection.py"
, line 642, in read_response
raise response
redis.exceptions.ResponseError: NOAUTH Authentication required.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 353, in
wrapper
ret = func(*func_args, **func_kwargs)
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 328, in
wrapper
[obj.on_error() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 328, in
<listcomp>
[obj.on_error() for obj in fixtures]
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 270, in
on_error
self.save()
File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 250, in save
self.storage.set(cookie_data, json.dumps(self.local.data), self.
expiration)
File
"/Users/sugizo/learn/python/web3py/applications/_scaffold/controllers.py",
line 18, in <lambda>
conn.set = lambda key, value, expire, cs=conn.set, ct=conn.ttl: (cs(key,
value), ct(expiration))
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/client.py"
, line 1451, in set
return self.execute_command('SET', *pieces)
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/client.py"
, line 775, in execute_command
return self.parse_response(connection, command_name, **options)
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/client.py"
, line 789, in parse_response
response = connection.read_response()
File
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/redis/connection.py"
, line 642, in read_response
raise response
redis.exceptions.ResponseError: NOAUTH Authentication required.
id= 7
best regards,
stifan
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.