Part of db.py file for connection with redis:
from gluon.contrib.redis_utils import RConn
rconn = RConn('localhost:6379')
from gluon.contrib.redis_session import RedisSession
sessiondb = RedisSession(redis_conn=rconn, with_lock=True,
session_expiry=3600)
session.connect(request, response, db = sessiondb)
Error when try to run the app:
Traceback (most recent call last):
File "/gestaopatio/web2py/gluon/main.py", line 460, in wsgibase
session._try_store_in_db(request, response)
File "/gestaopatio/web2py/gluon/globals.py", line 1238, in _try_store_in_db
record_id = table.insert(**dd)
File "/gestaopatio/web2py/gluon/contrib/redis_session.py", line 146, in insert
pipe.execute()
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 3691, in
execute
return execute(conn, stack, raise_on_error)
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 3557, in
_execute_transaction
if EMPTY_RESPONSE not in options])
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 761,
in pack_commands
for chunk in self.pack_command(*cmd):
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 737,
in pack_command
for arg in imap(self.encoder.encode, args):
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 107,
in encode
raise DataError("Invalid input of type: 'bool'. Convert to a "
DataError: Invalid input of type: 'bool'. Convert to a byte, string or number
first.
I think the problem is the last line, but not added any custom field do session
table
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/1563a68f-4f74-496f-b18a-6fdb92d56d83%40googlegroups.com.