trouble with import odbc

wryder at taz.cs.wcupa.edu wryder at taz.cs.wcupa.edu
Mon Dec 10 16:48:20 EST 2001


Anyone ever seen this error given the code after that:

 File "odbc.py", line 1, in ?
   import dbi, odbc, sys
 File "odbc.py", line 4, in ?
   s = odbc('postgresql/postgres/n4pk1n')
TypeError: object of type 'module' is not callable
-----------------
import dbi, odbc

s = odbc('postgresql/postgres/n4pk1n')
cur = s.cursor()
cur.execute('select * from discounts')
print cur.description
for tup in cur.description:
        print tup[0], print
while 1:
        rec = cur.fetchmany(10)
        if not rec: break
        print rec


Finding it very hard to chase stuff like this down.  What the heck does that
error message mean?  Maybe some nutrinos caused two bits on my hardrive to
swap so that the module is corrupt and isn't callable?  Whatever.  Anyway,
Thanks in advance!  wryder at taz.cs.wcupa.edu



 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse at newsone.net



More information about the Python-list mailing list