Error creating database on 3.8

26 views
Skip to first unread message

Karla Stenger

unread,
Oct 30, 2016, 4:15:04 AM10/30/16
to try...@googlegroups.com
Hi,
I'm setting up a completely new database in a virtualenv where I installed trytond 3.8 with pip.

When running: trytond -c tryton.conf --verbose --dev -d tryton38 --all ​

I get this error (on processing ir.lang with id lang_ca):

  File "/home/otro/.virtualenvs/tryton38-w-official-modules/local/lib/python2.7/site-packages/trytond/backend/postgresql/database.py", line 282, in execute
    return self.cursor.execute(sql, params)  
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 5: ordinal not in range(128)

See full traceback here: http://pastebin.com/Vz4qX9UN

Is this a known or already solved bug? (I couldn't find anything)
Do you have any suggestion on what I can do to skip it for now?

Thanks & cheers,
Karla.

--
-------------------------
Karla  Mª  Stenger  Sábat
karla....@gmail.com

Cédric Krier

unread,
Oct 30, 2016, 4:50:04 AM10/30/16
to try...@googlegroups.com
On 2016-10-29 22:21, Karla Stenger wrote:
> Hi,
> I'm setting up a completely new database in a virtualenv where I installed
> trytond 3.8 with pip.
>
> When running: trytond -c tryton.conf --verbose --dev -d tryton38 --all ​
>
> I get this error (on processing ir.lang with id lang_ca):
>
> File
> "/home/otro/.virtualenvs/tryton38-w-official-modules/local/lib/python2.7/site-packages/trytond/backend/postgresql/database.py",
> line 282, in execute
> return self.cursor.execute(sql, params)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in
> position 5: ordinal not in range(128)

For me, your database is not encoded in UTF-8.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Karla Stenger

unread,
Oct 30, 2016, 5:53:26 PM10/30/16
to try...@googlegroups.com
2016-10-30 5:46 GMT-03:00 Cédric Krier <cedric...@b2ck.com>:
On 2016-10-29 22:21, Karla Stenger wrote:
> Hi,
> I'm setting up a completely new database in a virtualenv where I installed
> trytond 3.8 with pip.
>
> When running: trytond -c tryton.conf --verbose --dev -d tryton38 --all ​
>
> I get this error (on processing ir.lang with id lang_ca):
>
>   File
> "/home/otro/.virtualenvs/tryton38-w-official-modules/local/lib/python2.7/site-packages/trytond/backend/postgresql/database.py",
> line 282, in execute
>     return self.cursor.execute(sql, params)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in
> position 5: ordinal not in range(128)

For me, your database is not encoded in UTF-8.

​Thank you Cédric, that was it!

To whoever meets the same problem on postgresql this link might be of help:
https://gist.github.com/ffmike/877447
 

​​Cheers,
Karla.

Reply all
Reply to author
Forward
0 new messages