Yep that was that the encoding
thanks all i did a replace with this regexp :
/[^\x00-\x7F]/
But it was hard to understand ...
Thanks
Bussiere
Le vendredi 23 mars 2012 15:14:02 UTC+1, Jonathan Lundell a écrit :
>
> On Mar 23, 2012, at 2:40 AM, bussiere adrien wrote:
> > # -*- coding: utf-8 -*-
> > def ensurefirstuser(firstname,lastname,email,password):
> > users = db(db.auth_user.email==email).select()
> > if users:
> > user_id = users[0].id
> > created = False
> > if settings.debug_ensure_first_user == True:
> > print ('found user_id so created equals %s') % created
> > return (user_id,created)
> >
> > else:
> > my_crypt = CRYPT(key=auth.settings.hmac_key)
> > crypt_pass = my_crypt(password)[0]
> > id_user= db.auth_user.insert(
> > first_name=firstname,
> > last_name=lastname,
> > email = email,
> > password = crypt_pass
> > )
> > created = True
> > if settings.debug_ensure_first_user == True:
> > print ('creating user_id')
> > return (id_user,created)
> >
> >
> > Here i truly don't understand why it still say invalid syntax and i'am
> investing on it fr hours ...
> >
> > Regards
> > Bussiere
> >
>
> You have a bunch of Unicode 200B (zero-width space) characters in it.
>