mysql 1064 oython_Python mysql错误#1064
我试图通过编写pipeline将数据存储到MySQL中,但是出现了:_mysql_exceptions.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 'desc,pic)values ('xe4\xbe\x9b\xe5\xba.......' at line 1")
这是我的代码:def __init__(self):
#self.file = codecs.open('tutorial_data.json','wb',encoding='utf-8')
self.dbpool = adbapi.ConnectionPool('MySQLdb',
host = 'localhost',
port = 3306,
db = 'project',
user = 'root',
passwd = '',
cursorclass = MySQLdb.cursors.DictCursor,
charset = 'utf8',
use_unicode = True)
def process_item(self, item, spider):
query = self.dbpool.runInteraction(self._conditional_insert, item)
query.addErrback(self.handle_error)
return item
def _conditional_insert(self,tx,item):
tx.execute(
"INSERT INTO raw (title,area,date,sclass,desc,pic )\
VALUES (%s, %s, %s, %s, %s, %s)",
(item['title'][0],
item['area'][0],
item['date'][0],
item['sclass'][0],
item['desc'][0],
item['pic'][0])
)
我的MySQL版本是5.6.17,MySQL python版本是1.2.5\
mysql 1064 oython_Python mysql错误#1064相关推荐
- mysql报4934_mysql-Mariadb语法错误1064(42000)
因此,当我尝试在MariaDB中运行此脚本时收到以下错误:" ERROR 1064(42000):您的SQL语法有错误:请查看与您的MariaDB服务器版本相对应的手册以获取正确的语法在附近 ...
- mysql function 1064_mysql 创建 function 错误 1064解决方案
在mysql5.1创建function时,总是报下面的错误 #1064 – You have an error in your SQL syntax; check the manual that co ...
- mysql导入sql抱错1064_mysql导入数据库错误#1064提示解决方法
文章总结了在mysql导入数据库时出现错误#1064 You have an error in your SQL syntax提示,我们这和数据库没什么关系大多是sql语句问题,或是数据库版本不兼容的 ...
- mysql创建表格显示1064错误_尝试创建表时出现错误1064(Error 1064 when trying to create a table)...
尝试创建表时出现错误1064(Error 1064 when trying to create a table) 这是代码: create table `team`.`User`( `UserID` ...
- 修改mysql密码时遇见ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that correspo
修改mysql密码时遇见ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that correspon ...
- mysql添加用户权限报1064 - You have an error in your SQL syntax问题解决
mysql添加用户及权限报错: 出现这样错的原因有两个: 1.语法有问题 (这里没有问题) 2.mysql版本是否支持 此种写法 找到一位大神说:你检查下mysql版本是mysql serve ...
- php1064,PHP创建表错误1064
我试图在mySQL中创建一个表.这是我下面的php页面,当我运行页面时没有错误但是表格不在mySQL中,当我在mySQL中测试代码时我得到了错误 #1064 – You have an error i ...
- php错误1064,求助,phpmyadmin导入sql文件提示1064错误
求助,phpmyadmin导入sql文件提示1064错误 -- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www. -- -- Host: 127 ...
- linux mysql 主从 1130_Linux Mysql 1130错误解决
Linux Mysql 1130错误解决 今天在win32下通过navicat 远程登录Mysql时出现如下错误: 想都不用想,肯定是Mysql的访问权限问题. 首先,通过终端(我用的是SSH)远程登 ...
最新文章
- UVa 1583 - Digit Generator
- destoon代码从头到尾捋一遍
- 在Spring Framework中通过JNDI进行配置
- Server 2008 R2 AD RMS完整部署:AD部署篇
- android里R.layout.的问题
- UCSD COGS108 数据科学实战中文笔记·翻译完成
- redis.conf
- 2019.3.9日面试自我介绍
- 两个数和三个数的最大值和最小值宏定义
- 不透明度16进制值对照表
- 计算机导论 ——绪论
- 云片网实现短信验证码
- Java 培训四个月能学会吗?
- ios开发-- URL Schemes 使用详解
- 力扣K神图解算法数据结构解析04
- dubbo整体设计整理
- 网页龙虎游戏有服务器吗,龙虎相争《龙将》中期玩家竞技PK心得
- unity 3分钟理解 批处理和drawcall有什么区别
- EXCEL的VBA编程基础1
- 用计算机弹奏的菊次郎的夏天,“你是钢琴家”“菊次郎的夏天”
热门文章
- ()IT 职场经验)一位10年Java工作经验的架构师的经验分享,感觉很受用。
- 算法之【折半插入法】
- Sublime Text 3 快捷键及使用技巧
- [转] C# 绘制报表,使用Graphics.DrawString 方法
- RDMBorderedButton
- 使用Oracle 11g新特性 Active Database Duplication 搭建Dataguard环境
- Navicat 用ssh通道连接时总是报错 (报错信息:SSH:expected key exchange group packet form serve...
- Delphi拖放编程
- Enterprise Library 4.1学习笔记3----安全应用程序块
- 在asp.net2.0中使用存储过程