Python-MySQLdb Upgrade Problem

Recently I got an error while running some Python scripts on a Red Hat Enterprise Linux 3, specifically when importing the MySQLdb module, with the the following error:

ImportError: cannot import name ImmutableSet

After some research I found that when upgrading the module to version 1.2.1 (or newer) the file sets.py, that was used on 1.2.0 or prior versions, still on system and this doesn’t contain ImmutableSet that’s defined as a default bult-in set in the recent versions of MySQLdb.

To solve this problem (tested on Python 2.4 and 2.6) just remove the sets.py from your MySQLdb installation directory.

Share and Enjoy:
  • email
  • Facebook
  • del.icio.us
  • Google Bookmarks
  • Yahoo! Bookmarks
  • LinkedIn
  • Twitter
  • Digg
  • Slashdot
  • Technorati
  • Identi.ca
  • Live

One Response to “Python-MySQLdb Upgrade Problem”

Leave a Reply