title: Python TypeError: '_asyncio.Future' object is not subscriptable
body: <p>Good afternoon! I am making a program that needs to POST 10,000 images to the API using the Python <strong>requests</strong> library. After sending every request, I receive a response with a hash(IpfsHash), which I need to write into a dictionary of the form: <strong>&quot;Hash&quot;: &quot;Number&quot;</strong>. To get started, I created a simple code (using a loop and not using async) and it worked. And then I used async to speed things up.
  Here is the code:</p>
  <pre><code>import asyncio
  import requests
  
  jsonHashes = {}
  responses = []
  
  def pinToIPFS(number):
      url = 'https://api.pinata.cloud/pinning/pinFileToIPFS'
      par = {
          'pinata_api_key': 'blabla',
          'pinata_secret_api_key': 'blabla'
      }
      file = {'file': open(str(number) + '.jpg', 'rb')}
  
      res = requests.post(url, headers = par, files = file)
      jsonHashes[res.json()['IpfsHash']] = number
      print(res.json()['IpfsHash'] + ' = ' + str(number))
  
  
  async def main():
      loop = asyncio.get_event_loop()
      futures = []
      for i in range(2):
          futures = loop.run_in_executor(None, pinToIPFS, i)
      for i in range(2):
          jsonHashes[await futures[i].json()['IpfsHash']] = i
      
  
  loop = asyncio.get_event_loop()
  loop.run_until_complete(main())
  
  
  print(jsonHashes)
  </code></pre>
  <p>But, for some reason I get the error:</p>
  <p><code>TypeError: '_asyncio.Future' object is not subscriptable</code></p>
  <p>And immediately after that, I get a response to the requests:</p>
  <pre><code>QmcZR3cpeVzQ56gyWs83dRS51rtkqjyoF167paJMPrn32w = 1
  QmehUERFcR6Erha6RtScDwfm1ACpZgGPrd5NNVnYWeDoH4 = 0
  </code></pre>
  <p>P.S. For simplicity, I put 2 iterations instead of 10,000.</p>