[Zope3-Users] Problem connecting to MySQL

Stephen Day shday at yahoo.com
Tue Sep 13 18:46:58 EDT 2005


Thanks to all for the help. I simply replaced one
file, adapter.py, with the new version and everything
worked fine.

--- Dmitry Vasiliev <lists at hlabs.spb.ru> wrote:

> Stephen Day wrote:
> > Hello,
> > 
> > I'm trying to access a MySQL database through
> Zope3
> > but I keep getting an error about encoding:
> > 
> > "LookupError: unknown encoding: latin1_swedish_ci"
> 
> > 
> > I've tried changing the encoding of the database
> and
> > the Zope connection object to utf8, among other
> > things, but nothing seems to work.
> > 
> > I'm using MySQL 4.1.14-nt, Zope-3.1.0c1 with
> > mysqldbda-1.0.0 installed, and Python 2.4.1.
> > 
> > I am able to connect to the database sucessfully
> afaik
> > because the USE statement seems to work (i.e.,
> there
> > is no error). One thing I am wondering is if the
> > database adapter was installed correctly... all I
> did
> > was copy the mysqldbda directory to
> > C:\zopeinstance\lib\python and then added the file
> > mysqldbda-configure.zcml to
> > C:\zopeinstance\etc\package-includes.
> > 
> > Any ideas? 
> 
> The problem seems that the adapter use
> connection.character_set_name()... Try 
> use Zope-3.1.0c2 and mysqldbda from svn trunk 
> http://svn.zope.org/mysqldbda/trunk/ then you can
> set connection encoding manually.
> 
> -- 
> Dmitry Vasiliev (dima at hlabs.spb.ru)
>      http://hlabs.spb.ru
> 



More information about the Zope3-users mailing list