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 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 installation.  I'm getting 
> other errors there but haven't had time to dig through it enough.
>
> But, I really appreciate you taking a look.  To me, this is a huge problem 
> that needs to be resolved.  Or, we have to stop using redis for sessions or 
> the web2py redis layer completely.
>
> -Jim
>
>
> On Friday, November 15, 2019 at 12:45:44 PM UTC-6, Leonel Câmara wrote:
>>
>> I haven't 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()}
>>
>> Would become
>>
>> rtn = {to_native(k): v for k, v in self.db.r_server.hgetall(key).items()}
>>
>> The second decode you used is also probably wrong although it may work 
>> with python 3. I would say it should be like this
>>
>> if to_native(rtn['unique_key']) == to_native(self.unique_key):
>>
>> If no one makes a pull request in the mean time, I'll probably have time 
>> to test this later in the month and do it.
>>
>>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/deaabeb8-e210-444e-9ae5-a468a071a29b%40googlegroups.com.

Reply via email to