title: asncio coroutine was never awaited
body: <p>I am attempting to run an experiment with 2 coroutines with asyncio. One loop is to scrape a weather data outside air temperature and the other loop is just a made up value with numpy random. Both coroutines have the same traceback nothing happens..</p>
  
  <p><code>RuntimeWarning: coroutine 'get_weather' was never awaited</code></p>
  
  <p>Would anyone have any ideas to try? I am trying to follow this <a href="https://stackoverflow.com/questions/53579094/coroutine-was-never-awaited">SO Post</a> for a similar question as well as this other <a href="https://stackoverflow.com/questions/57399157/runtimewarning-coroutine-main-was-never-awaited">SO Post</a> for running python 3.7 with coroutines which I am doing.</p>
  
  <pre><code>import asyncio
  import requests
  from bs4 import BeautifulSoup
  import pandas as pd
  import numpy as np
  
  
  headers = {
      'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
  
  async def get_weather():
      await asyncio.sleep(300)
  
      r = requests.get('https://www.google.com/search?q=weather%20duluth', headers=headers)
      soup = BeautifulSoup(r.text, 'html.parser')
      outTemp = soup.find("span", {"class": "wob_t"}).text
      intOutTemp = int(outTemp)
      print(f'got outside temperature data {intOutTemp}')
      return intOutTemp
  
  
  async def get_temp():
      await asyncio.sleep(10)
  
      inTemp = (random.random() * 20) - 5  # -5 to 15
      print(f'got inside temperature data {inTemp}')
      return temperature
  
  
  def main():
      loop1 = get_weather()
      loop2 = get_temp()
  
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p><strong><em>UPDATED CODE</em></strong></p>
  
  <pre><code>#py weatherAsyncio3.py
  
  import asyncio
  import aiohttp
  from bs4 import BeautifulSoup
  import pandas as pd
  import numpy as np
  import random
  
  headers = {
      'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
  
  async def get_weather():
      while True:
          await asyncio.sleep(1800)
  
          async with aiohttp.ClientSession() as session:
              async with session.get('https://www.google.com/search?q=weather%20duluth', headers=headers) as r:
                  soup = BeautifulSoup(await r.text(), 'html.parser')
                  outTemp = soup.find("span", {"class": "wob_t"}).text
                  intOutTemp = int(outTemp)
                  print(f'got outside temperature data {intOutTemp}')
                  return intOutTemp
  
  async def get_temp():
      while True:
          await asyncio.sleep(60)
  
          inTemp = (random.random() * 20) - 5  # -5 to 15
          print(f'got inside temperature data {inTemp}')
          return inTemp
  
  def main():
      loop = asyncio.get_event_loop()
      futureWeather = asyncio.ensure_future(get_weather())
      loop.run_until_complete(futureWeather)
  
      futureTemp = asyncio.ensure_future(get_temp())
      loop.run_until_complete(futureTemp)
  
  
  
  if __name__ == '__main__':
      main()
  </code></pre>