[web2py] Re: Trunk, error after login

2012-10-19 Thread Niphlod
doesn't happen here. What are you storing into session ?

On Friday, October 19, 2012 8:26:09 PM UTC+2, Marin Pranjić wrote:

 Traceback (most recent call last):
   File /home/www-data/test-web2py/gluon/main.py, line 561, in wsgibase
 session._try_store_on_disk(request, response)
   File /home/www-data/test-web2py/gluon/globals.py, line 703, in 
 _try_store_on_disk
 cPickle.dump(dict(self), response.session_file)
   File /usr/lib/python2.7/copy_reg.py, line 70, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
 TypeError: can't pickle function objects


 It happens with trunk and 2.1.1 but not with 2.0.9

 Marin



-- 





[web2py] Re: Trunk, error after login

2012-10-19 Thread Massimo Di Pierro
Do you have a lazy virtual fields in a table and then store records with 
the lazy virtual field in the session?

On Friday, 19 October 2012 13:26:09 UTC-5, Marin Pranjić wrote:

 Traceback (most recent call last):
   File /home/www-data/test-web2py/gluon/main.py, line 561, in wsgibase
 session._try_store_on_disk(request, response)
   File /home/www-data/test-web2py/gluon/globals.py, line 703, in 
 _try_store_on_disk
 cPickle.dump(dict(self), response.session_file)
   File /usr/lib/python2.7/copy_reg.py, line 70, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
 TypeError: can't pickle function objects


 It happens with trunk and 2.1.1 but not with 2.0.9

 Marin



-- 





[web2py] Re: Trunk, error after login

2012-10-19 Thread Marin Pranjić
I have virtual and lazy fields on auth_user table and I store them in auth 
on each request.

Lazy field is the the issue because I store lambda  in auth.
I just tried to remove it and it works without it.

So, I have:
if auth.user:
  auth.user.something = lambda: ...

And this fails.

I can live without it but I thought it was safe because auth is filtering 
the fields, right?

Dana petak, 19. listopada 2012. 20:52:15 UTC+2, korisnik Massimo Di Pierro 
napisao je:

 Do you have a lazy virtual fields in a table and then store records with 
 the lazy virtual field in the session?

 On Friday, 19 October 2012 13:26:09 UTC-5, Marin Pranjić wrote:

 Traceback (most recent call last):
   File /home/www-data/test-web2py/gluon/main.py, line 561, in wsgibase
 session._try_store_on_disk(request, response)
   File /home/www-data/test-web2py/gluon/globals.py, line 703, in 
 _try_store_on_disk
 cPickle.dump(dict(self), response.session_file)
   File /usr/lib/python2.7/copy_reg.py, line 70, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
 TypeError: can't pickle function objects


 It happens with trunk and 2.1.1 but not with 2.0.9

 Marin



-- 





[web2py] Re: Trunk, error after login

2012-10-19 Thread Massimo Di Pierro
The problem is that auth stores itself in session (session.auth = auth)
Now sure why this worked before. 

Massimo

On Friday, 19 October 2012 14:02:35 UTC-5, Marin Pranjić wrote:

 I have virtual and lazy fields on auth_user table and I store them in auth 
 on each request.

 Lazy field is the the issue because I store lambda  in auth.
 I just tried to remove it and it works without it.

 So, I have:
 if auth.user:
   auth.user.something = lambda: ...

 And this fails.

 I can live without it but I thought it was safe because auth is filtering 
 the fields, right?

 Dana petak, 19. listopada 2012. 20:52:15 UTC+2, korisnik Massimo Di Pierro 
 napisao je:

 Do you have a lazy virtual fields in a table and then store records with 
 the lazy virtual field in the session?

 On Friday, 19 October 2012 13:26:09 UTC-5, Marin Pranjić wrote:

 Traceback (most recent call last):
   File /home/www-data/test-web2py/gluon/main.py, line 561, in wsgibase
 session._try_store_on_disk(request, response)
   File /home/www-data/test-web2py/gluon/globals.py, line 703, in 
 _try_store_on_disk
 cPickle.dump(dict(self), response.session_file)
   File /usr/lib/python2.7/copy_reg.py, line 70, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
 TypeError: can't pickle function objects


 It happens with trunk and 2.1.1 but not with 2.0.9

 Marin



-- 





[web2py] Re: trunk error

2011-11-30 Thread Anthony
Thanks.

Re: [web2py] Re: trunk error

2011-11-30 Thread Bruno Rocha
Just got the same with firefox on windows

(dp1
S'output'
p2
Stype 'exceptions.SyntaxError' invalid syntax (user_agent_parser.py,
line 214)


-- 

Bruno Rocha
[http://rochacbruno.com.br]


Re: [web2py] Re: trunk error

2011-11-30 Thread Anthony
Note, this is also causing 'admin' to fail. I submitted a ticket.

On Wednesday, November 30, 2011 12:19:48 PM UTC-5, rochacbruno wrote:

 Just got the same with firefox on windows

 (dp1
 S'output'
 p2
 Stype 'exceptions.SyntaxError' invalid syntax (user_agent_parser.py, 
 line 214)


 -- 

 Bruno Rocha
 [http://rochacbruno.com.br]



Re: [web2py] Re: trunk error

2011-11-30 Thread Bruno Rocha
I just removed the {{is_mobile=request.user_agent().is_mobile}} from the
*/layout views and admin controller

it worked..

On Wed, Nov 30, 2011 at 4:03 PM, Anthony abasta...@gmail.com wrote:

 Note, this is also causing 'admin' to fail. I submitted a ticket.


 On Wednesday, November 30, 2011 12:19:48 PM UTC-5, rochacbruno wrote:

 Just got the same with firefox on windows

 (dp1
 S'output'
 p2
 Stype 'exceptions.SyntaxError' invalid syntax (user_agent_parser.py,
 line 214)


 --

 Bruno Rocha
 [http://rochacbruno.com.br]




-- 

Bruno Rocha
[http://rochacbruno.com.br]


Re: [web2py] Re: trunk error

2011-11-30 Thread Angelo Compagnucci
There is an error on line 214 of gluon/contrib/user_agent_parser.py,

should be:

dist=['WindowsMobile'], flavor=None

2011/11/30 Bruno Rocha rochacbr...@gmail.com:
 I just removed the {{is_mobile=request.user_agent().is_mobile}} from the
 */layout views and admin controller

 it worked..


 On Wed, Nov 30, 2011 at 4:03 PM, Anthony abasta...@gmail.com wrote:

 Note, this is also causing 'admin' to fail. I submitted a ticket.


 On Wednesday, November 30, 2011 12:19:48 PM UTC-5, rochacbruno wrote:

 Just got the same with firefox on windows

 (dp1
 S'output'
 p2
 Stype 'exceptions.SyntaxError' invalid syntax (user_agent_parser.py,
 line 214)


 --

 Bruno Rocha
 [http://rochacbruno.com.br]




 --

 Bruno Rocha
 [http://rochacbruno.com.br]




-- 
Profile: http://www.gild.com/compagnucciangelo
Register on Gild: http://www.gild.com/referral/compagnucciangelo


Re: [web2py] Re: trunk error

2011-11-30 Thread Anthony
Or you can just add that missing comma to user_agent_parser.py.

On Wednesday, November 30, 2011 1:11:49 PM UTC-5, rochacbruno wrote:

 I just removed the {{is_mobile=request.user_agent().is_mobile}} from the 
 */layout views and admin controller

 it worked..

 On Wed, Nov 30, 2011 at 4:03 PM, Anthony abas...@gmail.com wrote:

 Note, this is also causing 'admin' to fail. I submitted a ticket.


 On Wednesday, November 30, 2011 12:19:48 PM UTC-5, rochacbruno wrote:

 Just got the same with firefox on windows

 (dp1
 S'output'
 p2
 Stype 'exceptions.SyntaxError' invalid syntax (user_agent_parser.py, 
 line 214)


 -- 
  
 Bruno Rocha
 [http://rochacbruno.com.br]




 -- 

 Bruno Rocha
 [http://rochacbruno.com.br]



[web2py] Re: trunk error

2011-11-30 Thread Massimo Di Pierro
sorry. fixed.

On Nov 30, 12:21 pm, Anthony abasta...@gmail.com wrote:
 Or you can just add that missing comma to user_agent_parser.py.







 On Wednesday, November 30, 2011 1:11:49 PM UTC-5, rochacbruno wrote:

  I just removed the {{is_mobile=request.user_agent().is_mobile}} from the
  */layout views and admin controller

  it worked..

  On Wed, Nov 30, 2011 at 4:03 PM, Anthony abas...@gmail.com wrote:

  Note, this is also causing 'admin' to fail. I submitted a ticket.

  On Wednesday, November 30, 2011 12:19:48 PM UTC-5, rochacbruno wrote:

  Just got the same with firefox on windows

  (dp1
  S'output'
  p2
  Stype 'exceptions.SyntaxError' invalid syntax (user_agent_parser.py,
  line 214)

  --

  Bruno Rocha
  [http://rochacbruno.com.br]

  --

  Bruno Rocha
  [http://rochacbruno.com.br]