使用pyodbc,以下在Django中发生的SQLDriverConnect错误的任何解决方案

时间:2018-09-26 06:56:53

标签: python sql-server django ubuntu pyodbc

我正在使用“ django-pyodbc-azure”第三方库进行连接以及django1.11和python 3.5.2版

*** Error in `/home/ubuntu/GET-Services_mssql/env_mssql/bin/python': double free or corruption (!prev): 0x00007f7f08078a90 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f7f2a7a17e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f7f2a7aa37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f7f2a7ae53c]
/usr/lib/x86_64-linux-gnu/libodbc.so.2(SQLDriverConnectW+0x9a0)[0x7f7f24055100]
/home/ubuntu/GET-Services_mssql/env_mssql/lib/python3.5/site-packages/pyodbc.cpython-35m-x86_64-linux-gnu.so(_Z14Connection_NewP7_objectbblbS0_R6Object+0x2c3)[0x7f7f242a52a3]
/home/ubuntu/GET-Services_mssql/env_mssql/lib/python3.5/site-packages/pyodbc.cpython-35m-x86_64-linux-gnu.so(+0x111de)[0x7f7f242a21de]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyCFunction_Call+0x77)[0x4e9ba7]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x59f5)[0x53c6d5]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x540199]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x50b2)[0x53bd92]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5434af]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyCFunction_Call+0x4f)[0x4e9b7f]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x614)[0x5372f4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebd23]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4fb9ce]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_CallFunctionObjArgs+0x128)[0x5c1988]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x20bc)[0x538d9c]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebd98]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_CallFunctionObjArgs+0x128)[0x5c1988]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(_PyObject_GenericGetAttrWithDict+0x1bd)[0x593b9d]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x44d)[0x53712d]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x540199]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x50b2)[0x53bd92]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x540199]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x50b2)[0x53bd92]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ed3f5]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5b7994]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5b7fbc]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x57f03c]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4ec6)[0x53bba6]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebd23]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4fb9ce]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x584716]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5761aa]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x54320c]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4ce6)[0x53b9c6]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebe37]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x252b)[0x53920b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5406df]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x54f0)[0x53c1d0]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebe37]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x252b)[0x53920b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebe37]

1 个答案:

答案 0 :(得分:0)

我对这个问题的评论显然解决了这个问题:

  

Python 3.5.2和unixODBC 2.3.1听起来像Ubuntu 16.04。 Ubuntu存储库中的某些软件包可能非常旧,例如,unixODBC 2.3.1已有近7年的历史了。由于崩溃的是unixODBC(在SQLDriverConnectW中),您可能需要尝试将其升级到最新版本(当前为2.3.7)。