With a little side of applesauce...

Monday, April 14, 2008

Psycopg2 - "can't set encoding to" error

Due to a missing encoding field in the add.dtml file, psycopg2 sets to the default encoding of "".
http://64.233.167.104/search?q=cache:9adQCQHfN0EJ:www.initd.org/tracker/psycopg/ticket/190+psycopg2+%22can't+set+encoding+to%22&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a

This effects version 2.0.6. Here is the diff from my install:

--- DA.py.orig  2008-04-14 16:49:07.000000000 -0500
+++ DA.py 2008-04-14 16:49:37.000000000 -0500
@@ -79,7 +79,7 @@
icon = 'misc_/conn'

def __init__(self, id, title, connection_string,
- zdatetime, check=None, tilevel=2, encoding=''):
+ zdatetime, check=None, tilevel=2, encoding='utf-8'):
self.zdatetime = zdatetime
self.id = str(id)
self.edit(title, connection_string, zdatetime,



Just in case you can't get to the psycopg2 site.

No comments: