Python development error summary

1

pymysql.err.ProgrammingError: (1064, "You have an error 
in your SQL syntax; check the manual that corresponds 
to your MySQL server version for the right syntax 
to use near '),('150100',),'30000以上','牵引车')' at line 1")

Look carefully at the error message ('150100',) This is a tuple, which cannot be directly inserted into the library, just use the corner label.
For example, change the tuple result to result[0].

2

pymysql.err.InterfaceError: (0, '')

My mistake was to close the database link in advance, which led to an error. This kind of error can be viewed from the perspective of the database link.

3

unexpected indent

This is a problem of indentation, just paste the code into pycharm

Guess you like

Origin blog.csdn.net/qq_38220334/article/details/106528601