Hi Paolo, I get the error "<type 'exceptions.UnicodeDecodeError'> 'ascii' codec can't decode" using the latest web2py download (2.10.4-stable+timestamp.2015.04.26.15.11.54 (Running on Apache/2.4.7 (Ubuntu), Python 2.7.6)). This occurs even with “” characters in the on-board wiki. Could you tell me the steps of the easiest way to fix this? (I don't mind which i use pg8000 or psycopg2) Is it a simple matter of
sudo apt-get install python-psycopg2 ? On Sunday, June 21, 2015 at 11:20:33 PM UTC-7, Paolo Valleri wrote: > > Massimo the mentioned issue has been fixed in pydal. Have you found other > different issues? > > Paolo > > On Sunday, June 21, 2015 at 6:14:29 PM UTC+2, Massimo Di Pierro wrote: >> >> I think we should remove pg8000 unless this unicode problem is fixed. It >> just causes problem to new pgsql users. psycopg2 is solid. >> >> On Thursday, 18 June 2015 12:59:44 UTC-5, Paolo Valleri wrote: >>> >>> In general the best choice is psycopg2 however, the issue with pg8000 >>> has been fixed >>> I've written an initial basic unittest >>> https://github.com/web2py/pydal/blob/master/tests/base.py#L72 to check >>> possible issues with unicode >>> >>> >>> Paolo >>> >>> 2015-06-18 19:47 GMT+02:00 Antonio Salazar <asala...@gmail.com>: >>> >>>> Is it still recommended to use psycopg2 instead of pg8000 after this >>>> fix? >>>> >>>> El lunes, 15 de junio de 2015, 5:28:09 (UTC-5), Paolo Valleri escribió: >>>> >>>>> According to my tests, the current PG adapter works only with psycopg2 >>>>> and python2.7 >>>>> It is broken with both pg8000 and psycopg2 on python 3.x >>>>> >>>>> A possible fix for pg8000 and python2.7 is here >>>>> https://github.com/ilvalle/pydal/commit/d5450938ae606a3e85deffa831899a35146f5e64 >>>>> >>>>> I've posted an issue for psycopg2 with python3.x here >>>>> https://github.com/psycopg/psycopg2/issues/331#issuecomment-111909256 >>>>> >>>>> Paolo >>>>> >>>>> On Saturday, June 13, 2015 at 5:22:07 AM UTC+2, Massimo Di Pierro >>>>> wrote: >>>>>> >>>>>> It is a bug in pg8000. You need to install psycopg2 >>>>>> >>>>>> On Friday, 12 June 2015 13:51:55 UTC-5, Antonio Salazar wrote: >>>>>>> >>>>>>> I have the same problem. PostgreSQL database, web2py >>>>>>> 2.11.2-stable+timestamp.2015.05.30.16.33.24 >>>>>>> source install. >>>>>>> >>>>>>> Now any field update which has non-ASCII characters fails with >>>>>>> "<type 'exceptions.UnicodeDecodeError'> 'ascii' codec can't decode byte >>>>>>> 0xc3 in position X: ordinal not in range(128)" >>>>>>> By any field update, I mean custom forms, form grids, and even >>>>>>> database administration. >>>>>>> >>>>>>> This is the traceback after failing to change a user's name to >>>>>>> "José" with database administration: >>>>>>> >>>>>>> Traceback (most recent call last): >>>>>>> File "S:\Extranet\Website\Fuentes\web2py\gluon\restricted.py", line >>>>>>> 227, in restricted >>>>>>> exec ccode in environment >>>>>>> File >>>>>>> "S:/Extranet/Website/Fuentes/web2py/applications/extranet/controllers/appadmin.py" >>>>>>> <http://127.0.0.1:8000/admin/edit/extranet/controllers/appadmin.py>, >>>>>>> line 704, in <module> >>>>>>> File "S:\Extranet\Website\Fuentes\web2py\gluon\globals.py", line 412, >>>>>>> in <lambda> >>>>>>> self._caller = lambda f: f() >>>>>>> File >>>>>>> "S:/Extranet/Website/Fuentes/web2py/applications/extranet/controllers/appadmin.py" >>>>>>> <http://127.0.0.1:8000/admin/edit/extranet/controllers/appadmin.py>, >>>>>>> line 343, in update >>>>>>> if form.accepts(request.vars, session): >>>>>>> File "S:\Extranet\Website\Fuentes\web2py\gluon\sqlhtml.py", line >>>>>>> 1686, in accepts >>>>>>> self.id_field_name]).update(**fields) >>>>>>> File >>>>>>> "S:\Extranet\Website\Fuentes\web2py\gluon\packages\dal\pydal\objects.py", >>>>>>> line 2020, in update >>>>>>> ret = db._adapter.update("%s" % table._tablename,self.query,fields) >>>>>>> File >>>>>>> "S:\Extranet\Website\Fuentes\web2py\gluon\packages\dal\pydal\adapters\base.py", >>>>>>> line 996, in update >>>>>>> raise e >>>>>>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position >>>>>>> 57: ordinal not in range(128) >>>>>>> >>>>>>> >>>>>>> I don't recall having this problem with pre 2.10 versions >>>>>>> >>>>>> -- >>>> 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 a topic in the >>>> Google Groups "web2py-users" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/web2py/AE6NVmLPCwk/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> web2py+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- 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. For more options, visit https://groups.google.com/d/optout.