Greetings,
Attempting to enable Redis for sessions and get the following error when
web2py attempts to retrieve the keys it set on first access. (first page
loads and the keys are set and can be seen in redis via redis-cli).
python 3.6.8
web2py: latest master downloaded from repo at 10:00 GMT, 2 Nov 2019.
redis: 5.0.4
python-redis: 3.3.11
os: ubuntu 18.04 LTS
Traceback (most recent call last):
File
"/home/jose/python-environments/winp_ca/lib/web2py/gluon/restricted.py",
line 219, in restricted
exec(ccode, environment)
File
"/home/jose/python-environments/winp_ca/lib/web2py/applications/winp_ca/models/0_init.py"
, line 56, in <module>
session.connect(request, response, db = sessiondb)
File "/home/jose/python-environments/winp_ca/lib/web2py/gluon/globals.py",
line 971, in connect
row = table(record_id, unique_key=unique_key)
File
"/home/jose/python-environments/winp_ca/lib/web2py/gluon/contrib/redis_session.py"
, line 117, in __call__
row = q.select()
File
"/home/jose/python-environments/winp_ca/lib/web2py/gluon/contrib/redis_session.py"
, line 185, in select
rtn = {to_native(k.decode): v for k, v in self.db.r_server.hgetall(key).
items()}
File
"/home/jose/python-environments/winp_ca/lib/web2py/gluon/contrib/redis_session.py"
, line 185, in <dictcomp>
rtn = {to_native(k.decode): v for k, v in self.db.r_server.hgetall(key).
items()}
File
"/home/jose/python-environments/winp_ca/lib/web2py/gluon/packages/dal/pydal/_compat.py"
, line 136, in to_native
return obj.decode(charset, errors)
AttributeError: 'builtin_function_or_method' object has no attribute
'decode'
I know there had been issues with web2py-redis (see:
https://groups.google.com/forum/#!topic/web2py/0iU2wqSik0k) which were
resolved but suspect this is another issue. Anyone got this working with
py3 and the py-redis 3.3 library combo?
Thanks,
Jose
--
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/228cd131-1111-4732-aaab-f3009d03ea24%40googlegroups.com.