MySQL hardcoding?

marexposed at googlemail.com marexposed at googlemail.com
Thu Apr 17 14:41:49 EDT 2008


I've got this error (see the path in last line)

    db=MySQLdb.connect(host='localhost',use_unicode = True, charset = "Windows-1251",user='root',passwd='12',db='articulos')
  File "C:\Python24\Lib\site-packages\MySQLdb\__init__.py", line 74, in Connect
    return Connection(*args, **kwargs)
  File "C:\Python24\lib\site-packages\MySQLdb\connections.py", line 198, in __init__
    self.set_character_set(charset)
  File "C:\Python24\lib\site-packages\MySQLdb\connections.py", line 277, in set_character_set
    super(Connection, self).set_character_set(charset)
OperationalError: (2019, "Can't initialize character set Windows-1251 (path: C:\\mysql\\\\share\\charsets\\)")

The truth of the matter is, MySQL is not installed in that path, but into Program Files.
I don't know where the hardcoding is, but it is certainly somewhere. Except MySQL is reporting a wrong installation path.
I haven't found any other topic in the list about this problem.

I'm using Python 2.4 and latest MySQLdb. Have anyone heard of this issue and how to fix it?

Thanks a lot.



More information about the Python-list mailing list