title: How to solve "Database is locked" in telethon related scripts
body: <p>I try to run Basic commands from telethon in order to connect to Telegram and what I have is two errors: </p>
  
  <blockquote>
    <p>'AuthMethods._start' was never awaited
    <strong>RuntimeWarning: Enable tracemalloc to get the object allocation traceback  and DATABASE IS LOCKED</strong></p>
  </blockquote>
  
  <pre><code>from telethon import TelegramClient, sync
  from telethon.tl.functions.messages import GetHistoryRequest
  from telethon.errors.rpcerrorlist import RpcMcgetFailError
  
  
  api_id = xxxxxx
  api_hash = 'xxxxxxxxxxxx'
  
  phone_number = '+393333941671'
  sesssion_name = 'scraper'
  
  client = TelegramClient(sesssion_name,
                      api_id,
                      api_hash)
  
  client = TelegramClient('session_name', api_id, api_hash).start()
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>__main__:9: RuntimeWarning: coroutine 'AuthMethods._start' was never awaited
  RuntimeWarning: Enable tracemalloc to get the object allocation traceback
  Traceback (most recent call last):
  
    File "&lt;ipython-input-19-21e0fd5ffefd&gt;", line 11, in &lt;module&gt;
      client = TelegramClient('session_name', api_id, api_hash).start()
  
    File "C:\Users\Anca\Anaconda3\Lib\site-packages\telethon\client\telegrambaseclient.py", line 236, in __init__
      DEFAULT_PORT
  
    File "C:\Users\Anca\Anaconda3\Lib\site-packages\telethon\sessions\sqlite.py", line 157, in set_dc
      self._update_session_table()
  
    File "C:\Users\Anca\Anaconda3\Lib\site-packages\telethon\sessions\sqlite.py", line 183, in _update_session_table
      c.execute('delete from sessions')
  
  OperationalError: database is locked
  </code></pre>