Joe
I'm not sure if this is relevant as I don't remember the exact error I was
getting, but I made the following change just last week when I updated to
the latest web2py stable.
I went from:
rconn = RConn(ccfg.redis.server, ccfg.redis.port)
to:
rconn = RConn('redis_connection_name', ccfg.redis.server, ccfg.redis.port)
I'm using redis version 3.2.1. Everything was working fine until I updated
web2py and my redis version. Then it didn't work without this additional
parameter.
Please ignore if this is just noise.
-Jim
On Tuesday, March 19, 2019 at 11:07:43 PM UTC-5, Joe Barnhart wrote:
>
> Has something changed in the operation of redis to store sessions in
> web2py when we use python3 instead of python2? I'm hitting an error in the
> py-redis library that complains I can't store a boolean in redis
> (unsupported data type). Since this seems to be a well known design
> feature of redis I'm wondering how it seemed to work before. It's been
> awhile since I used it, but I swear it worked before. Didn't it? Maybe I
> dreamed it.
>
> -- Joe
>
> Message:
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
> 20.
> 21.
> 22.
> 23.
> 24.
> 25.
> 26.
> 27.
> 28.
>
> Traceback (most recent call last):
> File "/Users/jbarnhart/Work/w2p/w2p_ss_new/gluon/main.py", line 444, in
> wsgibase
> serve_controller(request, response, session)
> File "/Users/jbarnhart/Work/w2p/w2p_ss_new/gluon/main.py", line 206, in
> serve_controller
> raise HTTP(response.status, page, **response.headers)
> gluon.http.HTTP: 200 OK
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/Users/jbarnhart/Work/w2p/w2p_ss_new/gluon/main.py", line 460, in
> wsgibase
> session._try_store_in_db(request, response)
> File "/Users/jbarnhart/Work/w2p/w2p_ss_new/gluon/globals.py", line 1239, in
> _try_store_in_db
> record_id = table.insert(**dd)
> File "/Users/jbarnhart/Work/w2p/w2p_ss_new/gluon/contrib/redis_session.py",
> line 150, in insert
> pipe.execute()
> File
> "/Users/jbarnhart/.virtualenv/py3/lib/python3.7/site-packages/redis/client.py",
> line 3520, in execute
> return execute(conn, stack, raise_on_error)
> File
> "/Users/jbarnhart/.virtualenv/py3/lib/python3.7/site-packages/redis/client.py",
> line 3385, in _execute_transaction
> all_cmds = connection.pack_commands([args for args, options in cmds
> File
> "/Users/jbarnhart/.virtualenv/py3/lib/python3.7/site-packages/redis/connection.py",
> line 687, in pack_commands
> for chunk in self.pack_command(*cmd):
> File
> "/Users/jbarnhart/.virtualenv/py3/lib/python3.7/site-packages/redis/connection.py",
> line 663, in pack_command
> for arg in imap(self.encoder.encode, args):
> File
> "/Users/jbarnhart/.virtualenv/py3/lib/python3.7/site-packages/redis/connection.py",
> line 114, in encode
> raise DataError("Invalid input of type: 'bool'. Convert to a "
> redis.exceptions.DataError: Invalid input of type: 'bool'. Convert to a byte,
> string or number first.
>
>
--
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.