mysql 1064错误
mysql 1064错误
元禛慎独 发表于1年前
mysql 1064错误
  • 发表于 1年前
  • 阅读 14
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 技术升级10大核心产品年终让利>>>   

Traceback (most recent call last):
  File "load_juzhi_data.py", line 44, in <module>
    output_main(file_jz)
  File "load_juzhi_data.py", line 29, in output_main
    load_data_mysql(mysql)
  File "load_juzhi_data.py", line 13, in load_data_mysql
    cur.execute(mysql)
  File "D:\Anaconda2\lib\site-packages\pymysql\cursors.py", line 146, in execute
    result = self._query(query)
  File "D:\Anaconda2\lib\site-packages\pymysql\cursors.py", line 296, in _query
    conn.query(q)
  File "D:\Anaconda2\lib\site-packages\pymysql\connections.py", line 781, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "D:\Anaconda2\lib\site-packages\pymysql\connections.py", line 942, in _read_query_result
    result.read()
  File "D:\Anaconda2\lib\site-packages\pymysql\connections.py", line 1138, in read
    first_packet = self.connection._read_packet()
  File "D:\Anaconda2\lib\site-packages\pymysql\connections.py", line 906, in _read_packet
    packet.check_error()
  File "D:\Anaconda2\lib\site-packages\pymysql\connections.py", line 367, in check_error
    err.raise_mysql_exception(self._data)
  File "D:\Anaconda2\lib\site-packages\pymysql\err.py", line 120, in raise_mysql_exception
    _check_mysql_exception(errinfo)
  File "D:\Anaconda2\lib\site-packages\pymysql\err.py", line 112, in _check_mysql_exception
    raise errorclass(errno, errorvalue)
pymysql.err.ProgrammingError: (1064, u'')

##########################################################################

注意当mysql 出现这个错误,很可能是因为  在字段内容中出现 单引号或双引号,需插入前处理。

pymysql.err.ProgrammingError: (1036, u'')   表的字符集的问题

共有 人打赏支持
粉丝 3
博文 107
码字总数 54993
×
元禛慎独
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: