title: How to handle RuntimeWarning: coroutine 'new_account' was never awaited
body: <p>Whenever I start <em>web.py</em> and go to <code>localhost:8080/register</code> I get this error.
  It's part of a Flash game.</p>
  <pre class="lang-py prettyprint-override"><code>web.py:75: RuntimeWarning: coroutine 'new_account' was never awaited
    uid, password = utils.bot_common.new_account(app[&quot;redis&quot;])
  RuntimeWarning: Enable tracemalloc to get the object allocation traceback
  Error handling request
  Traceback (most recent call last):
    File &quot;/root/.local/lib/python3.7/site-packages/aiohttp/web_protocol.py&quot;, line418, in start
      resp = await task
    File &quot;/root/.local/lib/python3.7/site-packages/aiohttp/web_app.py&quot;, line 458,in _handle
      resp = await handler(request)
    File &quot;/root/.local/lib/python3.7/site-packages/aiohttp/web_middlewares.py&quot;, lne 119, in impl
      return await handler(request)
    File &quot;/root/.local/lib/python3.7/site-packages/aiohttp_session/__init__.py&quot;, ine 154, in factory
      response = await handler(request)
    File &quot;web.py&quot;, line 75, in register
      uid, password = utils.bot_common.new_account(app[&quot;redis&quot;])
  TypeError: cannot unpack non-iterable coroutine object
  </code></pre>
  <p>above error points to <em>web.py</em> Line 75:</p>
  <pre class="lang-py prettyprint-override"><code>@routes.get(&quot;/register&quot;)
  async def register(request):
      if not registation:
          return web.Response(text=&quot;Регистрация отключена&quot;)
      uid, password =  utils.bot_common.new_account(app[&quot;redis&quot;])
      return web.Response(text=f&quot;Аккаунт создан, ваш логин - {uid}, &quot;
                               f&quot;пароль - {password}&quot;)
  </code></pre>
  <p>Some more information from <em>bot_commony.py</em> register bot:</p>
  <pre class="lang-py prettyprint-override"><code>import string
  import random
  def random_string(string_length=20):
      letters = string.ascii_letters
      return ''.join(random.choice(letters) for i in range(string_length))
  
  async def new_account(redis):
      await redis.incr(&quot;uids&quot;)
      uid = await redis.get(&quot;uids&quot;)
      pipe = redis.pipeline()
      pipe.set(f&quot;uid:{uid}:lvt&quot;, 0)
      pipe.sadd(f&quot;rooms:{uid}&quot;, &quot;livingroom&quot;)
      pipe.rpush(f&quot;rooms:{uid}:livingroom&quot;, &quot;#livingRoom&quot;, 1)
      for i in range(1, 6):
          pipe.sadd(f&quot;rooms:{uid}&quot;, f&quot;room{i}&quot;)
          pipe.rpush(f&quot;rooms:{uid}:room{i}&quot;, f&quot;Комната {i}&quot;, 2)
      await pipe.execute()
      return uid
  </code></pre>