LabNeuroCogDevel / LNCDschedule

calendar and research schedule/visit DB interface
0 stars 1 forks source link

non ascii chars causes crash. see 10202 #46

Closed WillForan closed 2 years ago

WillForan commented 2 years ago
from lncdSql import lncdSql;sql=lncdSql('config_full.ini');sql.query.note_by_pid(pid=174)

/opt/ni_tools/python/userbase//lib/python3.7/site-packages/pyesql/parser.py in inner(self, *args, **kwargs)
     85         cursor = self.connection.cursor()
     86         cursor.execute(body, kwargs)
---> 87         return cursor.fetchall()
     88     inner.__doc__ = doc
     89     return inner

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 92: ordinal not in range(128)
WillForan commented 2 years ago

fix:add client_encoding to DB server! was only failing on old OSX/psql10 install. debian/13 had no problems

/usr/local/var/postgres/postgresql.conf 
client_encoding = utf8