Centos7使用python3连接inception报错解决办法
inception支持mysqldb库但不支持pymysql库,无奈mysqldb库不兼容py3,直接使用pymysql 连接inception报错如下:
ValueError: invalid literal for int() with base 10: 'Inception2'
需要修改pymysql源码修改connections.py及 cursors.py文件
# find / -name "connections.py"
# find / -name "cursors.py"
connections.py文件修改:
781行:
781 def _request_authentication(self):
782 # https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
783 #if int(self.server_version.split('.', 1)[0]) >= 5:
784 # self.client_flag |= CLIENT.MULTI_RESULTS
785 try:
786 if int(self.server_version.split('.', 1)[0]) >= 5:
787 self.client_flag |= CLIENT.MULTI_RESULTS
788 except:
789 if self.server_version.split('.', 1)[0] == 'Inception2':
790 self.client_flag |= CLIENT.MULTI_RESULTS
cursors.py文件修改:
355行:
355 def _show_warnings(self):
356 if self._warnings_handled:
357 return
358 self._warnings_handled = True
359 #if self._result and (self._result.has_next or not self._result.warning_count):
360 if self._result:
361 return
修改完后可用。
Centos7使用python3连接inception报错解决办法的更多相关文章
- Centos7下yum安装软件报错解决办法
Traceback (most recent call last): File "/usr/bin/yum", line 29, in yummain.user_main(sys. ...
- redis运用连接池报错解决
redis使用连接池报错解决redis使用十几小时就一直报异常 redis.clients.jedis.exceptions.JedisConnectionException: Could not g ...
- sphinx :undefined reference to `libiconv' 报错解决办法
sphinx :undefined reference to `libiconv' 报错解决办法 2013-11-30 21:45:39 安装sphinx时不停报错...郁闷在make时报错,错误 ...
- spring boot jpa 使用update 报错解决办法
在spring boot jpa 中自定义sql,执行update操作报错解决办法: 在@Query(...)上添加 @Modifying@Transactional注解
- Aasible中cryptography兼容性报错解决办法
Aasible中cryptography兼容性报错解决办法 1 Ansible中使用ansible --version查看版本,报错信息如下: ERROR! Unexpected Exception, ...
- sysctl -P 报错解决办法
sysctl -P 报错解决办法问题症状修改 linux 内核文件 #vi /etc/sysctl.conf后执行sysctl -P 报错error: "net.bridge.bridge ...
- R语言安装openxl包报错解决办法
在R语言中使用openxlsx包,会报错 解决办法就是: 下载安装Set-Rtool,安装时注意勾选对话框 然后在R中运行以下代码: Sys.setenv("R_ZIPCMD" = ...
- sysctl -P 报错解决办法 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown keyerror: "net.bridge.brid ...
- Authentication token manipulation error报错解决办法
Authentication token manipulation error报错解决办法 #参考http://blog.163.com/junwu_lb/blog/static/1916798920 ...
随机推荐
- Django配置websocket请求接口
1.settings.py INSTALLED_APPS = [ '...', 'channels', '...', ] ASGI_APPLICATION = 'server.routing.appl ...
- 微信开发者工具 关于no such file or directory
在新建页面中,保存后弹出 “ no such file or directory ” 错误 原因是打开了一个文件,然后在目录树中删除了它,但是这个被删除的页面依旧在打开状态,开发者工具在编译保存时由于 ...
- angular.module 详解
AngularJS 模块 模块包含了主要的应用代码. 一个应用可以包含多个模块,每一个模块都包含了定义具体功能的代码. 可以将module理解成一个容器,可以往其中放入controllers.serv ...
- SUSE Ceph Cephfs - Storage6
(1)Policy 配置文件,添加MDS角色定义 # vim /srv/pillar/ceph/proposals/policy.cfg # MDS role-mds/cluster/mds*.sls ...
- hive之建立分区表和分区
1. 建立分区表 create table 单分区表:其中分区字段是partdate,注意分区字段不能和表字段一样,否则会报重复的错 create table test_t2(words string ...
- Redis 从入门到放弃
Redis 从入门到放弃 http://www.iocoder.cn/Fight/Redis-went-from-getting-started-to-quitting/
- 基于Java+Selenium的WebUI自动化测试框架(五)------页面操作实现类
在编写完Log类和监听类之后,终于要回到正轨上来了.我们继续开始写UIExcutor的实现类. PS:如果你想让你的报告更加美观一些.推荐使用reportNG这个jar包. 在项目中导入reportn ...
- 【Java】Eclipse+环境安装及新建Project
安装Eclipse 1.进入ecilpse官方下载地址:https://www.eclipse.org/downloads/?FEATURED_STORY 2.点击红色箭头指向的Download Pa ...
- [2019南昌邀请赛网络赛D][dp]
https://nanti.jisuanke.com/t/38223 Xiao Ming recently indulges in match stick game and he thinks he ...
- [Javascript] Run asynchronous functions in sequence using reduce
This can be handy if you have a rate limit on API requests or if you need to pass the result of each ...