title: Python & SnakeSQL - raise lock.LockError('Lock no longer valid.') ERROR
body: <p>I am trying to run a python script (createdb.py) which has DB operations from my main python script (app.py) but having the below error.</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\web\application.py", line 236, in process
      return self.handle()
    File "C:\Python27\lib\site-packages\web\application.py", line 227, in handle
      return self._delegate(fn, self.fvars, args)
    File "C:\Python27\lib\site-packages\web\application.py", line 409, in _delegate
      return handle_class(cls)
    File "C:\Python27\lib\site-packages\web\application.py", line 384, in handle_class
      return tocall(*args)
    File "D:\Python\virtualenvs\new4\textweb\bin\app.py", line 16, in GET
      createdb.createTables()
    File "D:\Python\virtualenvs\new4\textweb\bin\createdb.py", line 9, in createTables
      cursor.execute("CREATE TABLE table (dateColumn Date, numberColumn Integer)")
    File "D:\Python\virtualenvs\new4\textweb\bin\SnakeSQL\driver\base.py", line 1548, in execute
      self.info = self.connection._create(parsedSQL['table'], parsedSQL['columns'], parameters)
    File "D:\Python\virtualenvs\new4\textweb\bin\SnakeSQL\driver\base.py", line 993, in _create
      self._insertRowInColTypes(table)
    File "D:\Python\virtualenvs\new4\textweb\bin\SnakeSQL\driver\base.py", line 632, in _insertRowInColTypes
      ], types= ['String','String','String','Bool','Bool','Bool','Text','Text','Integer']
    File "D:\Python\virtualenvs\new4\textweb\bin\SnakeSQL\driver\dbm.py", line 61, in _insertRow
      self.tables[table].file[str(primaryKey)] = str(values)
    File "D:\Python\virtualenvs\new4\textweb\bin\SnakeSQL\external\lockdbm.py", line 50, in __setitem__
      raise lock.LockError('Lock no longer valid.')
  LockError: Lock no longer valid.
  </code></pre>
  
  <p>Here is my createdb.py code;</p>
  
  <pre><code>import SnakeSQL
  
  connection = SnakeSQL.connect(database='test', autoCreate=True)
  connection = SnakeSQL.connect(database='test')
  
  cursor = connection.cursor()
  
  def createTables():
      cursor.execute("CREATE TABLE table (dateColumn Date, numberColumn Integer)")
      cursor.execute("INSERT INTO table (dateColumn, numberColumn) VALUES ('2003-11-8', 3)")
      cursor.execute("INSERT INTO table (dateColumn, numberColumn) VALUES ('2004-11-8', 4)")
      cursor.execute("INSERT INTO table (dateColumn, numberColumn) VALUES ('2005-11-8', 5)")
      cursor.execute("INSERT INTO table (dateColumn, numberColumn) VALUES ('2006-11-8', 6)")
  
  
  def select():
      selectResult = cursor.execute("SELECT dateColumn FROM table WHERE numberColumn = 3")
      return selectResult
  
  if __name__ == "__main__":
      createTables()
  </code></pre>
  
  <p>and here is my app.py code;</p>
  
  <pre><code>import web
  import SnakeSQL
  import createdb
  
  render = web.template.render('templates/')
  
  connection = SnakeSQL.connect(database='test')
  cursor = connection.cursor()
  
  urls = (
      '/', 'index'
  )
  
  class index:
      def GET(self):
          createdb.createTables()
          result = createdb.select()
          return render.index(result)
  
  
  if __name__ == "__main__":
      app = web.application(urls, globals())
      app.run()   
  </code></pre>
  
  <p>I couldn't find out why I am having this error. Can you please share your knowledge for solving this problem?</p>