pymssql 錯誤stringobject.c:4638: bad argument to internal function解決辦法
来源:互联网 发布:mac aecc2015 编辑:程序博客网 时间:2024/05/17 18:26
運行一段代碼
sql="select MA001,MA002,MA005,MA015,MA016,MA027,MA030,MA031,MA038,MA083from %s.dbo.COPMA COPMA where MA001=%(CUSTOM)s "
cur.execute(sql,d)
d為一個字典,卻出現錯誤
stringobject.c:4638 bad argument to internal function
但用shell執行卻正常,網上卻沒發現很好的解決辦法,也沒找到解決辦法,鬱悶了好幾天.
今天死活再試試,開心的是總算發現其中的差異。
程序中的SQL代碼和字典值為unicode類型,而shell中的只是asc類型。
總算可以哈哈幾下了,不用拼湊語句。
- pymssql 錯誤stringobject.c:4638: bad argument to internal function解決辦法
- Incompatible argument to function
- bad argument #2 to `format'(no value)
- non-numeric second argument to `wordlist' function: '
- non-numeric second argument to `wordlist' function
- non-numeric second argument to `wordlist' function
- Bad argument passed to camera service之Camera2
- OpenCV Error: Bad argument
- __gmsl:512: *** non-numeric second argument to `wordlist' function: ''
- *** non-numeric second argument to `wordlist' function: ''. Stop.
- *** non-numeric second argument to `wordlist' function: ''. Stop错误解决办法
- jni工程出现 non-numeric second argument to `wordlist' function
- jni编译non-numeric second argument to `wordlist' function错误
- NDK问题:non-numeric second argument to `wordlist' function:
- *** non-numeric second argument to `wordlist' function: ''. Stop错误解决办法
- non-floating-point argument in call to function ‘__builtin_isnan’
- function-style conversion to builtin type takes only one argument
- ORB-SLAM2中使用ROS遇到Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName
- WINDOWS钩子函数
- java中得到当前路径和Properties文件的方法
- google.com 首页代码分析
- EXCEL双击提示 确任您的文件类型和名字,并从新尝试
- 数字证书技术
- pymssql 錯誤stringobject.c:4638: bad argument to internal function解決辦法
- 高斯投影正算与反算的理论方法与实现代码
- 表达式求值
- 关于变量的一个奇怪的SQL
- hash(开放地址法解决冲突)
- 表联接查询
- 如何实现SSL 我要做的是U盘登录
- 用opencv加强cview的显示图像功能
- 基于JBoss来写MBean (转)