python pymssql charset=“gbk“ b‘DB-Lib error message 20010, severity 8

简介: python pymssql charset=“gbk“ b‘DB-Lib error message 20010, severity 8

报错:

(20010, b'DB-Lib error message 20010, severity 8:\nUnable to allocate sufficient memory (localhost)\nOperating System error during No error (12)\n')

代码:

import pymssql
conn = pymssql.connect(host=ip,user=u,passwd=p,port=int(port),database='master', timeout=5,charset="gbk")

解决:去掉 charset="utf-8" 参数

pymssql.connect(host=ip,user=u,passwd=p,port=int(port),database='master', timeout=5)
目录
相关文章
|
6月前
|
网络安全 Python
python request SSL error 403证书错误
python request SSL error 403证书错误
73 0
|
3月前
|
安全 网络安全 API
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
85 1
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
|
4月前
|
计算机视觉 Python
python opencv:ERROR: Could not find a version that satisfies the requirement opencv ERROR:
python opencv:ERROR: Could not find a version that satisfies the requirement opencv ERROR:
65 2
|
26天前
|
Python
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
|
2月前
|
Python
gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
42 1
|
2月前
|
SQL 关系型数据库 数据库连接
Python中使用pymysql和pymssql进行数据库操作的完整指南
Python中使用pymysql和pymssql进行数据库操作的完整指南
310 0
|
7月前
|
数据可视化 Python
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
|
5月前
|
编解码 Python Windows
Python文件路径报错SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: t
Python文件路径报错SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: t
|
3天前
|
JSON 数据格式 开发者
pip和requests在Python编程中各自扮演着不同的角色
`pip`是Python的包管理器,用于安装、升级和管理PyPI上的包;`requests`是一个HTTP库,简化了HTTP通信,支持各种HTTP请求类型及数据交互。两者在Python环境中分别负责包管理和网络请求。
16 5