Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
54 kB
3
Indexable
Never
Pushed message to queue: {"timestamp": "2023-12-05T14:52:26Z", "service": "holdings_uat", "logtype": "in_app_logs", "message": {"App Name": "helpers/instruments/gold", "Function Name": "fetch_invested_amount", "Thread Name": "Dummy-2", "Description": "Gold fetch_invested_amount() request failed with status code: 500\n\nResponse: b'<!doctype html>\\n<html lang=en>\\n  <head>\\n    <title>sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n[SQL: select sum(t1.pre_gst_buy_price) as inv_amt, sum(t1.gold_amount) as inv_gold_amt from public.goldtransaction t1, public.parenttransaction t2 where t1.gold_invoice_id is not null and t1.parent_transaction_id=t2.id and t2.investor_id=%(investor_id)s and t1.is_mmtc=%(is_mmtc)s and t1.is_diluted=%(is_diluted)s]\\n[parameters: {\\'investor_id\\': 12091, \\'is_mmtc\\': False, \\'is_diluted\\': False}]\\n(Background on this error at: https://sqlalche.me/e/14/f405)\\n // Werkzeug Debugger</title>\\n    <link rel=\"stylesheet\" href=\"?__debugger__=yes&amp;cmd=resource&amp;f=style.css\">\\n    <link rel=\"shortcut icon\"\\n        href=\"?__debugger__=yes&amp;cmd=resource&amp;f=console.png\">\\n    <script src=\"?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js\"></script>\\n    <script>\\n      var CONSOLE_MODE = false,\\n          EVALEX = true,\\n          EVALEX_TRUSTED = false,\\n          SECRET = \"jj08Z3RoiMlYq6p4qFrU\";\\n    </script>\\n  </head>\\n  <body style=\"background-color: #fff\">\\n    <div class=\"debugger\">\\n<h1>ProgrammingError</h1>\\n<div class=\"detail\">\\n  <p class=\"errormsg\">sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n[SQL: select sum(t1.pre_gst_buy_price) as inv_amt, sum(t1.gold_amount) as inv_gold_amt from public.goldtransaction t1, public.parenttransaction t2 where t1.gold_invoice_id is not null and t1.parent_transaction_id=t2.id and t2.investor_id=%(investor_id)s and t1.is_mmtc=%(is_mmtc)s and t1.is_diluted=%(is_diluted)s]\\n[parameters: {&#39;investor_id&#39;: 12091, &#39;is_mmtc&#39;: False, &#39;is_diluted&#39;: False}]\\n(Background on this error at: https://sqlalche.me/e/14/f405)\\n</p>\\n</div>\\n<h2 class=\"traceback\">Traceback <em>(most recent call last)</em></h2>\\n<div class=\"traceback\">\\n  <h3></h3>\\n  <ul><li><div class=\"frame\" id=\"frame-140605404276192\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">1900</em>,\\n      in <code class=\"function\">_execute_context</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">                    </span>for fn in self.dialect.dispatch.do_execute:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                        </span>if fn(cursor, statement, parameters, context):</pre>\\n<pre class=\"line before\"><span class=\"ws\">                            </span>evt_handled = True</pre>\\n<pre class=\"line before\"><span class=\"ws\">                            </span>break</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>if not evt_handled:</pre>\\n<pre class=\"line current\"><span class=\"ws\">                    </span>self.dialect.do_execute(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                        </span>cursor, statement, parameters, context</pre>\\n<pre class=\"line after\"><span class=\"ws\">                    </span>)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>if self._has_events or self.engine._has_events:</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>self.dispatch.after_cursor_execute(</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404276304\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py\"</cite>,\\n      line <em class=\"line\">732</em>,\\n      in <code class=\"function\">do_execute</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>def do_executemany(self, cursor, statement, parameters, context=None):</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>cursor.executemany(statement, parameters)</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>def do_execute(self, cursor, statement, parameters, context=None):</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>cursor.execute(statement, parameters)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def do_execute_no_params(self, cursor, statement, context=None):</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>cursor.execute(statement)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def is_disconnect(self, e, connection, cursor):</pre></div>\\n</div>\\n\\n<li><div class=\"exc-divider\">The above exception was the direct cause of the following exception:</div>\\n<li><div class=\"frame\" id=\"frame-140605404273056\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/app.py\"</cite>,\\n      line <em class=\"line\">2548</em>,\\n      in <code class=\"function\">__call__</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">    </span>def __call__(self, environ: dict, start_response: t.Callable) -&gt; t.Any:</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>&#34;&#34;&#34;The WSGI server calls the Flask application object as the</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>WSGI application. This calls :meth:`wsgi_app`, which can be</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>wrapped to apply middleware.</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>&#34;&#34;&#34;</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>return self.wsgi_app(environ, start_response)</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404274064\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/app.py\"</cite>,\\n      line <em class=\"line\">2528</em>,\\n      in <code class=\"function\">wsgi_app</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">            </span>try:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>ctx.push()</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>response = self.full_dispatch_request()</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>except Exception as e:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>error = e</pre>\\n<pre class=\"line current\"><span class=\"ws\">                </span>response = self.handle_exception(e)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>except:  # noqa: B001</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>error = sys.exc_info()[1]</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>raise</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>return response(environ, start_response)</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>finally:</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404268128\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask_cors/extension.py\"</cite>,\\n      line <em class=\"line\">165</em>,\\n      in <code class=\"function\">wrapped_function</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span># Wrap exception handlers with cross_origin</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span># These error handlers will still respect the behavior of the route</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>if options.get(&#39;intercept_exceptions&#39;, True):</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>def _after_request_decorator(f):</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>def wrapped_function(*args, **kwargs):</pre>\\n<pre class=\"line current\"><span class=\"ws\">                    </span>return cors_after_request(app.make_response(f(*args, **kwargs)))</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>return wrapped_function</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>if hasattr(app, &#39;handle_exception&#39;):</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>app.handle_exception = _after_request_decorator(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                    </span>app.handle_exception)</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404272608\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\"</cite>,\\n      line <em class=\"line\">271</em>,\\n      in <code class=\"function\">error_router</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span>if self._has_fr_route():</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>try:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>return self.handle_error(e)</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>except Exception:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>pass  # Fall through to original handler</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>return original_handler(e)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def handle_error(self, e):</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>&#34;&#34;&#34;Error handler for the API transforms a raised exception into a Flask</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>response, with the appropriate HTTP status code and body.</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404270704\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/app.py\"</cite>,\\n      line <em class=\"line\">2525</em>,\\n      in <code class=\"function\">wsgi_app</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span>ctx = self.request_context(environ)</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>error: t.Optional[BaseException] = None</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>try:</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>try:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>ctx.push()</pre>\\n<pre class=\"line current\"><span class=\"ws\">                </span>response = self.full_dispatch_request()</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>except Exception as e:</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>error = e</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>response = self.handle_exception(e)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>except:  # noqa: B001</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>error = sys.exc_info()[1]</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404269696\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/app.py\"</cite>,\\n      line <em class=\"line\">1822</em>,\\n      in <code class=\"function\">full_dispatch_request</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">            </span>request_started.send(self)</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>rv = self.preprocess_request()</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>if rv is None:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>rv = self.dispatch_request()</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>except Exception as e:</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>rv = self.handle_user_exception(e)</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>return self.finalize_request(rv)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def finalize_request(</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>self,</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>rv: t.Union[ft.ResponseReturnValue, HTTPException],</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404274736\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask_cors/extension.py\"</cite>,\\n      line <em class=\"line\">165</em>,\\n      in <code class=\"function\">wrapped_function</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span># Wrap exception handlers with cross_origin</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span># These error handlers will still respect the behavior of the route</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>if options.get(&#39;intercept_exceptions&#39;, True):</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>def _after_request_decorator(f):</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>def wrapped_function(*args, **kwargs):</pre>\\n<pre class=\"line current\"><span class=\"ws\">                    </span>return cors_after_request(app.make_response(f(*args, **kwargs)))</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>return wrapped_function</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>if hasattr(app, &#39;handle_exception&#39;):</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>app.handle_exception = _after_request_decorator(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                    </span>app.handle_exception)</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404270816\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\"</cite>,\\n      line <em class=\"line\">271</em>,\\n      in <code class=\"function\">error_router</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span>if self._has_fr_route():</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>try:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>return self.handle_error(e)</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>except Exception:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>pass  # Fall through to original handler</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>return original_handler(e)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def handle_error(self, e):</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>&#34;&#34;&#34;Error handler for the API transforms a raised exception into a Flask</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>response, with the appropriate HTTP status code and body.</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404273168\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/app.py\"</cite>,\\n      line <em class=\"line\">1820</em>,\\n      in <code class=\"function\">full_dispatch_request</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>try:</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>request_started.send(self)</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>rv = self.preprocess_request()</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>if rv is None:</pre>\\n<pre class=\"line current\"><span class=\"ws\">                </span>rv = self.dispatch_request()</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>except Exception as e:</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>rv = self.handle_user_exception(e)</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>return self.finalize_request(rv)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def finalize_request(</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404271712\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/app.py\"</cite>,\\n      line <em class=\"line\">1796</em>,\\n      in <code class=\"function\">dispatch_request</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">            </span>and req.method == &#34;OPTIONS&#34;</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>):</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>return self.make_default_options_response()</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span># otherwise dispatch to the handler for that endpoint</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>view_args: t.Dict[str, t.Any] = req.view_args  # type: ignore[assignment]</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def full_dispatch_request(self) -&gt; Response:</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>&#34;&#34;&#34;Dispatches the request and on top of that performs request</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>pre and postprocessing as well as HTTP exception catching and</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>error handling.</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404275632\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\"</cite>,\\n      line <em class=\"line\">467</em>,\\n      in <code class=\"function\">wrapper</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>:param resource: The resource as a flask view function</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>&#34;&#34;&#34;</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>@wraps(resource)</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>def wrapper(*args, **kwargs):</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>resp = resource(*args, **kwargs)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>if isinstance(resp, ResponseBase):  # There may be a better way to test</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>return resp</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>data, code, headers = unpack(resp)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>return self.make_response(data, code, headers=headers)</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>return wrapper</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404271376\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask/views.py\"</cite>,\\n      line <em class=\"line\">107</em>,\\n      in <code class=\"function\">view</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>def view(**kwargs: t.Any) -&gt; ft.ResponseReturnValue:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>self = view.view_class(  # type: ignore[attr-defined]</pre>\\n<pre class=\"line before\"><span class=\"ws\">                    </span>*class_args, **class_kwargs</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>)</pre>\\n<pre class=\"line current\"><span class=\"ws\">                </span>return current_app.ensure_sync(self.dispatch_request)(**kwargs)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>else:</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>self = cls(*class_args, **class_kwargs)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>def view(**kwargs: t.Any) -&gt; ft.ResponseReturnValue:</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404272832\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\"</cite>,\\n      line <em class=\"line\">582</em>,\\n      in <code class=\"function\">dispatch_request</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">            </span>decorators = self.method_decorators</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>for decorator in decorators:</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>meth = decorator(meth)</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>resp = meth(*args, **kwargs)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>if isinstance(resp, ResponseBase):  # There may be a better way to test</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>return resp</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>representations = self.representations or OrderedDict()</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404275408\">\\n  <h4>File <cite class=\"filename\">\"/transaction-service/handlers/webhook_handler.py\"</cite>,\\n      line <em class=\"line\">28</em>,\\n      in <code class=\"function\">post</code></h4>\\n  <div class=\"source \"><pre class=\"line before\"><span class=\"ws\">        </span>wallet_balance = params.get(&#39;wallet_balance&#39;, {})</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>resp_data = {}</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>if is_gold and (not inv_id or not wallet_balance):</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>return JsonResponse({&#39;code&#39;: 400, &#39;message&#39;: &#39;Missing required field&#39;}, status=400)</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>if is_gold:</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>gold_txn_amount_sg = get_inv_gold_txns(inv_id, &#34;SG&#34;, buy=True)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span># gold_txn_amount_sg_sold = get_inv_gold_txns(inv_id, &#34;SG&#34;)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>gold_txn_amount_mm = get_inv_gold_txns(inv_id, &#34;MM&#34;, buy=True)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span># gold_txn_amount_mm_sold = get_inv_gold_txns(inv_id, &#34;MM&#34;)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>mmtc_txns = get_inv_all_gold_txns(inv_id, &#34;MM&#34;)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>sg_txns = get_inv_all_gold_txns(inv_id, &#34;SG&#34;)</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404272496\">\\n  <h4>File <cite class=\"filename\">\"/transaction-service/helpers/db_helpers.py\"</cite>,\\n      line <em class=\"line\">732</em>,\\n      in <code class=\"function\">get_inv_gold_txns</code></h4>\\n  <div class=\"source \"><pre class=\"line before\"><span class=\"ws\">             </span>&#34;t2.investor_id=:investor_id and t1.is_mmtc=:is_mmtc and t1.is_diluted=:is_diluted&#34;)</pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>if not buy:</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>q = text(&#34;select sum(t1.credited_amount) as sold_amt, sum(t1.gold_amount) as sold_gold_amt from public.goldtransaction t1, public.parenttransaction t2&#34;</pre>\\n<pre class=\"line before\"><span class=\"ws\">             </span>&#34; where t1.gold_invoice_id is not null and t1.credited_amount is not null and t1.parent_transaction_id=t2.id and &#34;</pre>\\n<pre class=\"line before\"><span class=\"ws\">             </span>&#34;t2.investor_id=:investor_id and t1.is_mmtc=:is_mmtc and t1.is_diluted=:is_diluted&#34;)</pre>\\n<pre class=\"line current\"><span class=\"ws\">    </span>return normalised_response(db2_engine.execute(q, param))</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\"></span>def get_buy_txn_details(buy_txns):</pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>from settings import create_app</pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>app = create_app(&#34;db_helpers&#34;)</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404271600\">\\n  <h4>File <cite class=\"filename\">\"&lt;string&gt;\"</cite>,\\n      line <em class=\"line\">2</em>,\\n      in <code class=\"function\">execute</code></h4>\\n  <div class=\"source \"></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404274288\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py\"</cite>,\\n      line <em class=\"line\">402</em>,\\n      in <code class=\"function\">warned</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span>skip_warning = not enable_warnings or kwargs.pop(</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>&#34;_sa_skip_warning&#34;, False</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>)</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>if not skip_warning:</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>_warn_with_version(message, version, wtype, stacklevel=3)</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>return fn(*args, **kwargs)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>doc = func.__doc__ is not None and func.__doc__ or &#34;&#34;</pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>if docstring_header is not None:</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>docstring_header %= dict(func=func.__name__)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404271152\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">3257</em>,\\n      in <code class=\"function\">execute</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span>will also be closed, which allows its associated DBAPI connection</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>resource to be returned to the connection pool.</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>&#34;&#34;&#34;</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>connection = self.connect(close_with_result=True)</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>return connection.execute(statement, *multiparams, **params)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>@util.deprecated_20(</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>&#34;:meth:`_engine.Engine.scalar`&#34;,</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>alternative=&#34;All statement execution in SQLAlchemy 2.0 is performed &#34;</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>&#34;by the :meth:`_engine.Connection.execute` method of &#34;</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404275520\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">1380</em>,\\n      in <code class=\"function\">execute</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">        </span>except AttributeError as err:</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>util.raise_(</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>exc.ObjectNotExecutableError(statement), replace_context=err</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>)</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>else:</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def _execute_function(self, func, multiparams, params, execution_options):</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>&#34;&#34;&#34;Execute a sql.FunctionElement object.&#34;&#34;&#34;</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>return self._execute_clauseelement(</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404274960\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py\"</cite>,\\n      line <em class=\"line\">333</em>,\\n      in <code class=\"function\">_execute_on_connection</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>def _execute_on_connection(</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>self, connection, multiparams, params, execution_options, _force=False</pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>):</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>if _force or self.supports_execution:</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>return connection._execute_clauseelement(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>self, multiparams, params, execution_options</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>)</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>else:</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>raise exc.ObjectNotExecutableError(self)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404274848\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">1572</em>,\\n      in <code class=\"function\">_execute_clauseelement</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">            </span>column_keys=keys,</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>for_executemany=for_executemany,</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>schema_translate_map=schema_translate_map,</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>linting=self.dialect.compiler_linting | compiler.WARN_LINTING,</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>)</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>ret = self._execute_context(</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>dialect,</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>dialect.execution_ctx_cls._init_compiled,</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>compiled_sql,</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>distilled_params,</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>execution_options,</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404272384\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">1943</em>,\\n      in <code class=\"function\">_execute_context</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">                    </span># CursorResult already exhausted rows / has no rows.</pre>\\n<pre class=\"line before\"><span class=\"ws\">                    </span># close us now</pre>\\n<pre class=\"line before\"><span class=\"ws\">                    </span>branched.close()</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>except BaseException as e:</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>self._handle_dbapi_exception(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>e, statement, parameters, cursor, context</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>return result</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404275744\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">2124</em>,\\n      in <code class=\"function\">_handle_dbapi_exception</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">                    </span>self._autorollback()</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>if newraise:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>util.raise_(newraise, with_traceback=exc_info[2], from_=e)</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>elif should_wrap:</pre>\\n<pre class=\"line current\"><span class=\"ws\">                </span>util.raise_(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                    </span>sqlalchemy_exception, with_traceback=exc_info[2], from_=e</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>)</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>else:</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>util.raise_(exc_info[1], with_traceback=exc_info[2])</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404275856\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py\"</cite>,\\n      line <em class=\"line\">208</em>,\\n      in <code class=\"function\">raise_</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">            </span># intermediary exception does not change, but we can&#39;t figure</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span># that out.</pre>\\n<pre class=\"line before\"><span class=\"ws\">            </span>exception.__cause__ = replace_context</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>try:</pre>\\n<pre class=\"line current\"><span class=\"ws\">            </span>raise exception</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>finally:</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span># credit to</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span># https://cosmicpercolator.com/2016/01/13/exception-leaks-in-python-2-and-3/</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span># as the __traceback__ object creates a cycle</pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>del exception, replace_context, from_, with_traceback</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404275968\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\"</cite>,\\n      line <em class=\"line\">1900</em>,\\n      in <code class=\"function\">_execute_context</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\">                    </span>for fn in self.dialect.dispatch.do_execute:</pre>\\n<pre class=\"line before\"><span class=\"ws\">                        </span>if fn(cursor, statement, parameters, context):</pre>\\n<pre class=\"line before\"><span class=\"ws\">                            </span>evt_handled = True</pre>\\n<pre class=\"line before\"><span class=\"ws\">                            </span>break</pre>\\n<pre class=\"line before\"><span class=\"ws\">                </span>if not evt_handled:</pre>\\n<pre class=\"line current\"><span class=\"ws\">                    </span>self.dialect.do_execute(</pre>\\n<pre class=\"line after\"><span class=\"ws\">                        </span>cursor, statement, parameters, context</pre>\\n<pre class=\"line after\"><span class=\"ws\">                    </span>)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">            </span>if self._has_events or self.engine._has_events:</pre>\\n<pre class=\"line after\"><span class=\"ws\">                </span>self.dispatch.after_cursor_execute(</pre></div>\\n</div>\\n\\n<li><div class=\"frame\" id=\"frame-140605404276080\">\\n  <h4>File <cite class=\"filename\">\"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py\"</cite>,\\n      line <em class=\"line\">732</em>,\\n      in <code class=\"function\">do_execute</code></h4>\\n  <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>def do_executemany(self, cursor, statement, parameters, context=None):</pre>\\n<pre class=\"line before\"><span class=\"ws\">        </span>cursor.executemany(statement, parameters)</pre>\\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line before\"><span class=\"ws\">    </span>def do_execute(self, cursor, statement, parameters, context=None):</pre>\\n<pre class=\"line current\"><span class=\"ws\">        </span>cursor.execute(statement, parameters)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def do_execute_no_params(self, cursor, statement, context=None):</pre>\\n<pre class=\"line after\"><span class=\"ws\">        </span>cursor.execute(statement)</pre>\\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\\n<pre class=\"line after\"><span class=\"ws\">    </span>def is_disconnect(self, e, connection, cursor):</pre></div>\\n</div>\\n</ul>\\n  <blockquote>sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n[SQL: select sum(t1.pre_gst_buy_price) as inv_amt, sum(t1.gold_amount) as inv_gold_amt from public.goldtransaction t1, public.parenttransaction t2 where t1.gold_invoice_id is not null and t1.parent_transaction_id=t2.id and t2.investor_id=%(investor_id)s and t1.is_mmtc=%(is_mmtc)s and t1.is_diluted=%(is_diluted)s]\\n[parameters: {&#39;investor_id&#39;: 12091, &#39;is_mmtc&#39;: False, &#39;is_diluted&#39;: False}]\\n(Background on this error at: https://sqlalche.me/e/14/f405)\\n</blockquote>\\n</div>\\n\\n<div class=\"plain\">\\n    <p>\\n      This is the Copy/Paste friendly version of the traceback.\\n    </p>\\n    <textarea cols=\"50\" rows=\"10\" name=\"code\" readonly>Traceback (most recent call last):\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 1900, in _execute_context\\n    self.dialect.do_execute(\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py&#34;, line 732, in do_execute\\n    cursor.execute(statement, parameters)\\npsycopg2.errors.UndefinedColumn: column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n\\nThe above exception was the direct cause of the following exception:\\n\\nTraceback (most recent call last):\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/app.py&#34;, line 2548, in __call__\\n    return self.wsgi_app(environ, start_response)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/app.py&#34;, line 2528, in wsgi_app\\n    response = self.handle_exception(e)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask_cors/extension.py&#34;, line 165, in wrapped_function\\n    return cors_after_request(app.make_response(f(*args, **kwargs)))\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py&#34;, line 271, in error_router\\n    return original_handler(e)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/app.py&#34;, line 2525, in wsgi_app\\n    response = self.full_dispatch_request()\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/app.py&#34;, line 1822, in full_dispatch_request\\n    rv = self.handle_user_exception(e)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask_cors/extension.py&#34;, line 165, in wrapped_function\\n    return cors_after_request(app.make_response(f(*args, **kwargs)))\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py&#34;, line 271, in error_router\\n    return original_handler(e)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/app.py&#34;, line 1820, in full_dispatch_request\\n    rv = self.dispatch_request()\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/app.py&#34;, line 1796, in dispatch_request\\n    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py&#34;, line 467, in wrapper\\n    resp = resource(*args, **kwargs)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask/views.py&#34;, line 107, in view\\n    return current_app.ensure_sync(self.dispatch_request)(**kwargs)\\n  File &#34;/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py&#34;, line 582, in dispatch_request\\n    resp = meth(*args, **kwargs)\\n  File &#34;/transaction-service/handlers/webhook_handler.py&#34;, line 28, in post\\n    gold_txn_amount_sg = get_inv_gold_txns(inv_id, &#34;SG&#34;, buy=True)\\n  File &#34;/transaction-service/helpers/db_helpers.py&#34;, line 732, in get_inv_gold_txns\\n    return normalised_response(db2_engine.execute(q, param))\\n  File &#34;&lt;string&gt;&#34;, line 2, in execute\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py&#34;, line 402, in warned\\n    return fn(*args, **kwargs)\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 3257, in execute\\n    return connection.execute(statement, *multiparams, **params)\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 1380, in execute\\n    return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py&#34;, line 333, in _execute_on_connection\\n    return connection._execute_clauseelement(\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 1572, in _execute_clauseelement\\n    ret = self._execute_context(\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 1943, in _execute_context\\n    self._handle_dbapi_exception(\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 2124, in _handle_dbapi_exception\\n    util.raise_(\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py&#34;, line 208, in raise_\\n    raise exception\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&#34;, line 1900, in _execute_context\\n    self.dialect.do_execute(\\n  File &#34;/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py&#34;, line 732, in do_execute\\n    cursor.execute(statement, parameters)\\nsqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n[SQL: select sum(t1.pre_gst_buy_price) as inv_amt, sum(t1.gold_amount) as inv_gold_amt from public.goldtransaction t1, public.parenttransaction t2 where t1.gold_invoice_id is not null and t1.parent_transaction_id=t2.id and t2.investor_id=%(investor_id)s and t1.is_mmtc=%(is_mmtc)s and t1.is_diluted=%(is_diluted)s]\\n[parameters: {&#39;investor_id&#39;: 12091, &#39;is_mmtc&#39;: False, &#39;is_diluted&#39;: False}]\\n(Background on this error at: https://sqlalche.me/e/14/f405)\\n</textarea>\\n</div>\\n<div class=\"explanation\">\\n  The debugger caught an exception in your WSGI application.  You can now\\n  look at the traceback which led to the error.  <span class=\"nojavascript\">\\n  If you enable JavaScript you can also use additional features such as code\\n  execution (if the evalex feature is enabled), automatic pasting of the\\n  exceptions and much more.</span>\\n</div>\\n      <div class=\"footer\">\\n        Brought to you by <strong class=\"arthur\">DON\\'T PANIC</strong>, your\\n        friendly Werkzeug powered traceback interpreter.\\n      </div>\\n    </div>\\n\\n    <div class=\"pin-prompt\">\\n      <div class=\"inner\">\\n        <h3>Console Locked</h3>\\n        <p>\\n          The console is locked and needs to be unlocked by entering the PIN.\\n          You can find the PIN printed out on the standard output of your\\n          shell that runs the server.\\n        <form>\\n          <p>PIN:\\n            <input type=text name=pin size=14>\\n            <input type=submit name=btn value=\"Confirm Pin\">\\n        </form>\\n      </div>\\n    </div>\\n  </body>\\n</html>\\n\\n<!--\\n\\nTraceback (most recent call last):\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 1900, in _execute_context\\n    self.dialect.do_execute(\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py\", line 732, in do_execute\\n    cursor.execute(statement, parameters)\\npsycopg2.errors.UndefinedColumn: column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n\\nThe above exception was the direct cause of the following exception:\\n\\nTraceback (most recent call last):\\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 2548, in __call__\\n    return self.wsgi_app(environ, start_response)\\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 2528, in wsgi_app\\n    response = self.handle_exception(e)\\n  File \"/usr/local/lib/python3.10/site-packages/flask_cors/extension.py\", line 165, in wrapped_function\\n    return cors_after_request(app.make_response(f(*args, **kwargs)))\\n  File \"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\", line 271, in error_router\\n    return original_handler(e)\\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 2525, in wsgi_app\\n    response = self.full_dispatch_request()\\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 1822, in full_dispatch_request\\n    rv = self.handle_user_exception(e)\\n  File \"/usr/local/lib/python3.10/site-packages/flask_cors/extension.py\", line 165, in wrapped_function\\n    return cors_after_request(app.make_response(f(*args, **kwargs)))\\n  File \"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\", line 271, in error_router\\n    return original_handler(e)\\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 1820, in full_dispatch_request\\n    rv = self.dispatch_request()\\n  File \"/usr/local/lib/python3.10/site-packages/flask/app.py\", line 1796, in dispatch_request\\n    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\\n  File \"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\", line 467, in wrapper\\n    resp = resource(*args, **kwargs)\\n  File \"/usr/local/lib/python3.10/site-packages/flask/views.py\", line 107, in view\\n    return current_app.ensure_sync(self.dispatch_request)(**kwargs)\\n  File \"/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py\", line 582, in dispatch_request\\n    resp = meth(*args, **kwargs)\\n  File \"/transaction-service/handlers/webhook_handler.py\", line 28, in post\\n    gold_txn_amount_sg = get_inv_gold_txns(inv_id, \"SG\", buy=True)\\n  File \"/transaction-service/helpers/db_helpers.py\", line 732, in get_inv_gold_txns\\n    return normalised_response(db2_engine.execute(q, param))\\n  File \"<string>\", line 2, in execute\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py\", line 402, in warned\\n    return fn(*args, **kwargs)\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 3257, in execute\\n    return connection.execute(statement, *multiparams, **params)\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 1380, in execute\\n    return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py\", line 333, in _execute_on_connection\\n    return connection._execute_clauseelement(\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 1572, in _execute_clauseelement\\n    ret = self._execute_context(\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 1943, in _execute_context\\n    self._handle_dbapi_exception(\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 2124, in _handle_dbapi_exception\\n    util.raise_(\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py\", line 208, in raise_\\n    raise exception\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py\", line 1900, in _execute_context\\n    self.dialect.do_execute(\\n  File \"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py\", line 732, in do_execute\\n    cursor.execute(statement, parameters)\\nsqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column t1.is_diluted does not exist\\nLINE 1: ...and t2.investor_id=12091 and t1.is_mmtc=false and t1.is_dilu...\\n                                                             ^\\n\\n[SQL: select sum(t1.pre_gst_buy_price) as inv_amt, sum(t1.gold_amount) as inv_gold_amt from public.goldtransaction t1, public.parenttransaction t2 where t1.gold_invoice_id is not null and t1.parent_transaction_id=t2.id and t2.investor_id=%(investor_id)s and t1.is_mmtc=%(is_mmtc)s and t1.is_diluted=%(is_diluted)s]\\n[parameters: {\\'investor_id\\': 12091, \\'is_mmtc\\': False, \\'is_diluted\\': False}]\\n(Background on this error at: https://sqlalche.me/e/14/f405)\\n\\n\\n-->\\n'"}, "severity": "INFO", "user": {}}
Leave a Comment