Thanx

I removed the 'u' infront of string and it works

thanx again

On Wednesday, May 15, 2013 11:29:34 AM UTC+2, Ricardo Pedroso wrote:
>
> > Thank you for showing interest in resolving this. I apologize for not 
> answering faster 
> > 
> > @Massimo - where do I set layout encoding? 
> > 
> > 
> > This is the whole error trace 
>
> What you show us was not your traceback, here is your traceback, 
> not that hard and concise and just to the point, right? 
>
> Traceback (most recent call last): 
>   File "/usr/local/web2py/gluon/restricted.py", line 205, in restricted 
>     exec ccode in environment 
>   File "/usr/local/web2py/applications/iurnik/controllers/user.py", 
> line 8, in <module> 
>   File "/usr/local/web2py/gluon/globals.py", line 173, in <lambda> 
>     self._caller = lambda f: f() 
>   File "/usr/local/web2py/applications/iurnik/controllers/user.py", 
> line 3, in user 
>     form = auth() 
>   File "/usr/local/web2py/gluon/tools.py", line 1161, in __call__ 
>     return getattr(self,args[0])() 
>   File "/usr/local/web2py/gluon/tools.py", line 1967, in register 
>     callback(onaccept,form) 
>   File "/usr/local/web2py/gluon/tools.py", line 57, in callback 
>     [action(form) for action in actions] 
>   File "/usr/local/web2py/applications/iurnik/models/db.py", line 143, 
> in <lambda> 
>     message=u\'Na bazi %s se je kreiral nov uporabnik %s %s z e-mailom 
> %s , ki ga je potrebno potrditi\' % (database, form.vars.first_name , 
> form.vars.last_name, form.vars.email)) 
> UnicodeDecodeError: \'ascii\' codec can\'t decode byte 0xc5 in 
> position 0: ordinal not in range(128) 
>
>
> I think your problem is in models/db.py in the following line: 
>
>   message=u'Na bazi %s se je kreiral nov uporabnik %s %s z e-mailom %s 
> , ki ga je potrebno potrditi' % (database, form.vars.first_name, 
> form.vars.last_name, form.vars.email)) 
>
> try to remove the u in front of the string: 
>
>   message = 'Na bazi ..... 
>
> or decode the form vars, ex: 
>
> .... % (...., form.vars.first_name.decode('utf-8'), ....) 
>
>
> Ricardo 
>

-- 

--- 
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/groups/opt_out.


Reply via email to