title: Adding flask POST request causes Terra.py LCDClient event loop error?
body: <p>When I test this code with insomnia using the commented binance imports and client lines instead of those for terra it outputs success, and when using the full code with the order method etc it works fine. When I use it as is with <a href="https://terra-money.github.io/terra.py/tutorial.html" rel="nofollow noreferrer">terra-sdk</a> instead it runs but as soon as I send a POST request it errors as below. I have completed the official Terra Python SDK video tutorials for creating wallets and interacting with contracts, tried using <a href="https://terra-money.github.io/terra.py/guides/async.html" rel="nofollow noreferrer">AsyncLCDClient</a> instead, and researched general async and async flask suggestions I read online for the error but I have not been able to resolve this. As someone new to python, is there way to fix this issue without using async, or is there a basic example for something similar I could use as a template to implement it properly?</p>
  <pre><code>import json, config
  from terra_sdk.client.lcd.lcdclient import LCDClient
  from flask import Flask, request
  # from binance.client import Client
  # from binance.enums import *
  app = Flask(__name__)
  
  # client = Client(config.BINANCE_API_KEY, config.BINANCE_API_SECRET, tld='com')
  # client.API_URL = 'https://testnet.binance.vision/api'
  
  terra = LCDClient(&quot;https://bombay-lcd.terra.dev&quot;, &quot;bombay-12&quot;)
  
  @app.route('/webhook', methods=['POST'])
  def webhook():
      #print(request.data)
      data = json.loads(request.data)
  
      if (data['passphrase']) != config.WEBHOOK_PASSPHRASE:
          return {
              &quot;code&quot;: &quot;error&quot;,
              &quot;message&quot;: &quot;invalid passphrase&quot;
          }
      else:
              return {
              &quot;code&quot;: &quot;success&quot;,
              &quot;message&quot;: &quot;authorised&quot;
          }
  
  Traceback (most recent call last):
    File &quot;/home/hashewnuts/cloud/code/VisualStudioCode/terrabot-tradingview/app.py&quot;, line 11, in &lt;module&gt;
      terra = LCDClient(&quot;https://bombay-lcd.terra.dev&quot;, &quot;bombay-12&quot;)
    File &quot;/home/hashewnuts/cloud/code/VisualStudioCode/terrabot-tradingview/venv/lib/python3.8/site-packages/terra_sdk/client/lcd/lcdclient.py&quot;, line 197, in __init__
      loop=nest_asyncio.apply(get_event_loop()),
    File &quot;/usr/lib/python3.8/asyncio/events.py&quot;, line 639, in get_event_loop
      raise RuntimeError('There is no current event loop in thread %r.'
  RuntimeError: There is no current event loop in thread 'Thread-1'.
  </code></pre>