Avatar

Michael's Blog

Home | RSS | Gallery | Stats | About | Comics | Downloads | Links | Scripts | Test Scripts | Wiki | Xen Stats |

--> -->
 
 
<class '_sqlite.DatabaseError'>
Python 2.5.2: /usr/bin/python
Fri Sep 3 07:42:31 2010

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/home/wattersm/public_html/view.py in ()
   15 common.print_header()
   16 
   17 result = dbclass.run_query("SELECT author,date,title,text,id,tags FROM stories where id='%s'" %id)
   18 
   19 for record in result:
result undefined, dbclass = <module 'dbclass' from '/export/home/wattersm/modules/site/dbclass.pyc'>, dbclass.run_query = <function run_query at 0x8259304>, id = '177'
 /usr/home/wattersm/modules/site/dbclass.py in run_query(sql="SELECT author,date,title,text,id,tags FROM stories where id='177'")
   12    db = connect_db()
   13    cursor = db.cursor()
   14    cursor.execute(sql)
   15    result = cursor.fetchall()
   16    return result
cursor = <sqlite.main.Cursor instance at 0x82ac66c>, cursor.execute = <bound method Cursor.execute of <sqlite.main.Cursor instance at 0x82ac66c>>, sql = "SELECT author,date,title,text,id,tags FROM stories where id='177'"
 /usr/lib/python2.5/site-packages/sqlite/main.py in execute(self=<sqlite.main.Cursor instance at 0x82ac66c>, SQL="SELECT author,date,title,text,id,tags FROM stories where id='177'", *parms=())
  242         if len(parms) == 0:
  243             # If there are no paramters, just execute the query.
  244             self.rs = self.con.db.execute(SQL)
  245         else:
  246             if len(parms) == 1 and \
self = <sqlite.main.Cursor instance at 0x82ac66c>, self.rs = None, self.con = <weakproxy at 0x82a9964 to instance at 0x8254a8c>, self.con.db = <Connection object at 0x82a9980>, self.con.db.execute = <built-in method execute of Connection object at 0x82a9980>, SQL = "SELECT author,date,title,text,id,tags FROM stories where id='177'"

<class '_sqlite.DatabaseError'>: no such column: id
      args = ('no such column: id',)
      message = 'no such column: id'