[web2py] Re: Redis session error - latest web2py master

2019-12-07 Thread Massimo Di Pierro
You are right. I misunderstood the issue. I read the thread again I thought this was a py3 only issue. Will look into this shortly. On Tuesday, 3 December 2019 08:26:15 UTC-8, Leonel Câmara wrote: > > py4web does sessions in redis by default (if you have redis). Just saying. >> > > Massimo, this

[web2py] Re: Redis session error - latest web2py master

2019-12-03 Thread Leonel Câmara
> > py4web does sessions in redis by default (if you have redis). Just saying. > Massimo, this really doesn't help. Web2py had working redis sessions and right now, in master, it doesn't. Web2py should not break existing apps just because there's py4web, there's no way people can all migrate t

[web2py] Re: Redis session error - latest web2py master

2019-11-29 Thread Jose C
On Thursday, 28 November 2019 23:21:39 UTC, Massimo Di Pierro wrote: > > py4web does sessions in redis by default (if you have redis). Just saying. > Yep and it looks promising but I don't have the guts to migrate a mature site with tens of thousands of users on to it yet - a bit too bleeding edg

[web2py] Re: Redis session error - latest web2py master

2019-11-28 Thread Massimo Di Pierro
py4web does sessions in redis by default (if you have redis). Just saying. On Thursday, 28 November 2019 14:56:37 UTC-8, Jose C wrote: > > >> Any feel for how many people are using redis for sessions? >> >> +1 on on redis for sessions. Use it for multiple apps although they're > all older web2py

[web2py] Re: Redis session error - latest web2py master

2019-11-28 Thread Jose C
> > > Any feel for how many people are using redis for sessions? > > +1 on on redis for sessions. Use it for multiple apps although they're all older web2py versions and python 2 setups. Upgrading one to python 3 and web2py 2.18.5 which is when the redis session functionality broke. Jim's fi

[web2py] Re: Redis session error - latest web2py master

2019-11-28 Thread Jim S
I submitted one quite some time ago for Python 2 and python redis 2 and 3, but not for Python 3. The fix I proposed here doesn't not work for Python 2.While I'd prefer to put sessions in redis, they work perfectly well in the database. Redis works just fine (any version) as long as you're

[web2py] Re: Redis session error - latest web2py master

2019-11-28 Thread Massimo Di Pierro
Did I drop the ball on this one? I do not see a PR On Thursday, 21 November 2019 08:22:58 UTC-8, Jim S wrote: > > FWIW - I gave up on waiting. Converted my sessions to use the database. > > I use redis in other parts of my app within web2py and am having no > troubles there. > > -Jim > > On Fr

[web2py] Re: Redis session error - latest web2py master

2019-11-21 Thread Jim S
FWIW - I gave up on waiting. Converted my sessions to use the database. I use redis in other parts of my app within web2py and am having no troubles there. -Jim On Friday, November 15, 2019 at 1:45:25 PM UTC-6, Jim S wrote: > > > Do you know much about sessions? Are the values all supposed

[web2py] Re: Redis session error - latest web2py master

2019-11-15 Thread Jim S
Do you know much about sessions? Are the values all supposed to be binary? The .decode on the if to_native(rtn['unique_key']) == to_native(self.unique_key): was to convert it from binary to test against the string stored in self.unique_key. Also, this fix isn't working in my python 2 insta

[web2py] Re: Redis session error - latest web2py master

2019-11-15 Thread Leonel Câmara
I haven tried it, but I think the best fix is not to make the decode work by putting the obviously missing parenthesis. The fix is simply to remove the .decode, because to_native should take care of it, so this: rtn = {to_native(k.decode): v for k, v in self.db.r_server.hgetall(key). items()} W

[web2py] Re: Redis session error - latest web2py master

2019-11-15 Thread Jose C
Nice catch, Jim the .decode() on line 192. It appears to be working as expected now (at least in my use case). I am going to continue testing session functionality and will report if any further issues arise. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

[web2py] Re: Redis session error - latest web2py master

2019-11-14 Thread Jim S
I just messed with this a little bit and got past the login with python3, web2py and redis. Here is the code, lines 185 thru 192 of redis_session.py: rtn = {to_native(k.decode()): v for k, v in self.db.r_server. hgetall(key).items()} if rtn: if self.unique

[web2py] Re: Redis session error - latest web2py master

2019-11-12 Thread Jim S
Just wondering if there has been any further work on this. I'm working on converting all to python 3 but this is keeping us from moving right now. -Jim On Wednesday, November 6, 2019 at 5:34:16 PM UTC-6, Jim S wrote: > > Same here. I've reported and submitted a fix but it was rejected. It >

[web2py] Re: Redis session error - latest web2py master

2019-11-06 Thread Jim S
Same here. I've reported and submitted a fix but it was rejected. It worked for all of our use cases. On Wednesday, November 6, 2019 at 9:19:07 AM UTC-6, Leonel Câmara wrote: > > We also got this bug when we tried to upgrade to the latest web2py and had > to rollback. We were using the old 2.X

[web2py] Re: Redis session error - latest web2py master

2019-11-06 Thread Jose C
On Wednesday, 6 November 2019 15:19:07 UTC, Leonel Câmara wrote: > > We also got this bug when we tried to upgrade to the latest web2py and had > to rollback. We were using the old 2.X pyredis and then tried with 3.X you > get the same problem with both. Please report this issue in github, if no

[web2py] Re: Redis session error - latest web2py master

2019-11-06 Thread Leonel Câmara
We also got this bug when we tried to upgrade to the latest web2py and had to rollback. We were using the old 2.X pyredis and then tried with 3.X you get the same problem with both. Please report this issue in github, if no one fixes it we will probably end up fixing it as we also need this fix.

[web2py] Re: Redis session error - latest web2py master

2019-11-04 Thread Jose C
So it appears to be a bug... adding () after the decode on line 185 of redis_session.py appears to resolve the cause of this traceback. However another issue has cropped up... every page hit results in a new session key being created which means they're unusable. Changing sessions from redis