Apologies in advance if this message repeats; I changed email addresses and the first sending was trapped by the administrator.  I've resubscribed and am resending.
 
I have an interesting (OK, frustating) problem.  I've been developing on Win98, successfully connecting to a MySQL database via MySQLdb.  I recently installed Win2K Pro on my development machine in dual-boot mode.  I installed ActivePython 2.10.210, MySQLdb 0.3.5 and MySQL 3.23.38 under Win2K.  MySQL works fine, MySQLFront connects, lets me browse tables, etc. so I know the server is doing its job.
 
However, I haven't been able to connect to the database via MySQLdb.  I have a little Python script I originally used to learn how to handle the data returned by a cursor within Python, called "testdb_list.py" Here's a code snippet:
__________________________________________
import sys
import traceback
sys.stderr = sys.stdout
import MySQLdb
try:
    ThisDB = MySQLdb.Connect(db='LabTracker')
except:
        traceback.print_exc()
        sys.exit()
____________________________________________
 
Running this code (from within PythonWin) worked fine this morning, and I went on to get a cursor, etc.  Now, I get the following traceback:
 
  File "C:\My Documents\Dev Stuff\testdb_list.py", line 8, in ?
    ThisDB = MySQLdb.connect(db='LabTracker')
AttributeError: 'MySQLdb' module has no attribute 'Connect'
 
I looked through MySQLdb.py and the statement "Connect = connect = Connection" is right where I expected it to be.  I've also tried the same code replacing "Connect" with "Connection" and "connect", to no avail.  I'm trying to finish up a project which will involve installation on WinNT 4.0 (which is why I'm fiddling with Win2K; it's the closet thing I have to the NT 4 environment), so any help will be tremendously appreciated!
 
Thanks in advance,
 
John Hopkins

Reply via email to