pymysql.err.DataError: (1366, "Incorrect decimal value: '嘉定老城' for column 'price' at row 1")
时间: 2023-10-28 09:45:54 浏览: 167
This error message suggests that there is an issue with the data being inserted into the 'price' column of a MySQL table using PyMySQL. Specifically, it appears that the value being inserted, which is '嘉定老城', is not a valid decimal value.
To fix this issue, you will need to ensure that the data being inserted into the 'price' column is in the correct format. In this case, it is likely that the 'price' column should only contain numerical values. You may need to modify your code to convert any non-numerical values to a valid decimal format before inserting them into the database.
Alternatively, you may need to modify the data type of the 'price' column in the MySQL table to allow for non-decimal values, such as a string or text data type. However, this will depend on the specific requirements of your application and data model.
阅读全文