程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Please consult an error reporting problem handled by python

編輯:Python

stay AWS log Such error information is obtained in the log :
Part omitted

@message
{"time": "2022-07-22T03:23:20+00:00", "level": "error", "app_log_type": "failure", "name": "python-batch-data-anonymization", "trace": {"class": null, "file": "/program/app/table_config.py", "line": 174, "message": "Wrong name in config or last date log.", "errors": {"Errr2_1": [{"Sheet": "Index", "Table": "provider_ind_sms_settings"}, {"Sheet": "Index", "Table": "provider_ind_sms_templates"}], "Errr2_2": [], "Errr2_3": [], "Errr2_4": [], "Errr2_5": [], "Errr2_6": []}}, "log_id": "4e2807a5-ab0c-400e-b822-ac41855f1caa", "log_no": "Errr2_11"}

table_config.py Document No 174 The front and back of the line are as follows :

def validate_dataframe(self):

 for sheetname in self.df_conf.keys(): if sheetname == "Index": try: if not self.df_conf[sheetname].dtypes[2] == "int64": raise TypeError(self.ERR_CONFIG_OUTPUT) except TypeError as e: err = {
"Sheet": "Index", "Column": "OUTPUT"} self.errors[self.ERR_CONFIG_OUTPUT].append(err) self.log.error(e, e.args[0], None, err) elif sheetname.startswith(self.SHEET_PREFIX): try: if not self.df_conf[sheetname].dtypes[1] == "bool": raise TypeError(self.ERR_CONFIG_OUTPUT) except TypeError as e: err = {
"Sheet": sheetname, "Column": "OUTPUT"} self.errors[self.ERR_CONFIG_OUTPUT].append(err) self.log.error(e, e.args[0], None, err) try: if not self.df_conf[sheetname].dtypes[2] == "bool": raise TypeError(self.ERR_CONFIG_HASHED) except TypeError as e: err = {
"Sheet": sheetname, "Column": "HASHED"} self.errors[self.ERR_CONFIG_HASHED].append(err) self.log.error(e, e.args[0], None, err) Want to ask why this error is most likely ( Table name not found ? Other problems ?) And then , If there are deficiencies in the code, please add , Thank you for your guidance !

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved