in

PYMySQL Arora Database Insertion Issue(1265, "Data truncated "Incorrect integer value: ‘NULL’ ,"Incorrect decimal value: ‘NULL’ for column ‘colname))


I have an Excel file from that excel file i am inserting the data to MYSQL Arora Database, I am able to connect to Database the only issue is while inserting the data into database i am getting below error and my inserting is not happening properly.
Can you please suggest How to solve below Error.

C:App_Newapp
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'daily_upper' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'daily_lower' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'curr_week_date' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'curr_week_price' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'prev_week_date' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'prev_week_price' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect decimal value: 'NULL' for column 'wow_change' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect decimal value: 'NULL' for column 'weekly_upper' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect decimal value: 'NULL' for column 'weekly_lower' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect integer value: 'NULL' for column 'wow_flag' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'curr_month_date' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'curr_month_price' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'prev_month_date' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'prev_month_price' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect decimal value: 'NULL' for column 'mom_change' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect decimal value: 'NULL' for column 'monthly_upper' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect decimal value: 'NULL' for column 'monthly_lower' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1366, "Incorrect integer value: 'NULL' for column 'mom_flag' at row 1")
  result = self._query(query)
C:Program Files (x86)Python37-32libsite-packagespymysqlcursors.py:170: Warning: (1265, "Data truncated for column 'dod_change' at row 1")
  result = self._query(query)
EO_alert_data
object of type 'NoneType' has no len()
--- Logging error ---
Traceback (most recent call last):
  File "C:App_newappeo_processingeo_alerts_situationApproach 2Situation_Model.py", line 781, in main
    qa_instance.insert_daily_exchange_data_daily(daily_exchange_values,SPEND_DATA_JSON,DAILY_EXCHANGE_RATE_TABLE_NAME)
  File "C:App_newappeo_processingeo_alerts_situationApproach 2Insert_alert_data_QA.py", line 350, in insert_daily_exchange_data_daily
    raise e
  File "C:App_newappeo_processingeo_alerts_situationApproach 2Insert_alert_data_QA.py", line 345, in insert_daily_exchange_data_daily
    self.update_bu_ou_situation_QA()
  File "C:App_newappeo_processingeo_alerts_situationApproach 2Insert_alert_data_QA.py", line 358, in update_bu_ou_situation_QA
    if len(df_output)>0:
TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:Program Files (x86)Python37-32liblogging__init__.py", line 1034, in emit
    msg = self.format(record)
  File "C:Program Files (x86)Python37-32liblogging__init__.py", line 880, in format
    return fmt.format(record)
  File "C:Program Files (x86)Python37-32liblogging__init__.py", line 619, in format
    record.message = record.getMessage()
  File "C:Program Files (x86)Python37-32liblogging__init__.py", line 380, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "C:App_newappeo_processingeo_alerts_situationApproach 2Situation_Model.py", line 825, in <module>
    data_for_alert = main(comm_data,eo_cat_comm,hist_data,lifetime_data,Daily_Thresholds,Weekly_Thresholds,Monthly_Thresholds)
  File "C:App_newappeo_processingeo_alerts_situationApproach 2Situation_Model.py", line 786, in main
    logger.error('Error pushing data in QA :', e)
Message: 'Error pushing data in QA :'
Arguments: (TypeError("object of type 'NoneType' has no len()"),)

Any Help will be Highly Appreciable.
Thank you in Advance.



Source: https://stackoverflow.com/questions/70552663/pymysql-arora-database-insertion-issue1265-data-truncated-incorrect-integer

Implements a deep pretty printer for Go data structures to aid in debugging

a website built with React js with beautiful UI