[2022-11-17 23:42:36,043] ERROR in app: Exception on /stock/600146 [GET]
Traceback (most recent call last):
File "/home/azureuser/anaconda3/envs/py38/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/azureuser/anaconda3/envs/py38/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/azureuser/anaconda3/envs/py38/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/home/azureuser/anaconda3/envs/py38/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/azureuser/anaconda3/envs/py38/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "stock_predictor/app.py", line 103, in predict
result = service.get_history_and_predict_result(id, today)
File "/home/azureuser/projects/StockPredictor/stock_predictor/service.py", line 178, in get_history_and_predict_result
UnboundLocalError: local variable 'predicted_trading_date' referenced before assignment
Reproduce link: http://20.205.61.210:5000/stock/600146
Looks like the delisted stock has some problem.