任何人都可以逐步解释以下堆栈跟踪吗?
Can anyone explain the following stack trace, in step by step, please?
任何人都可以逐步解释以下堆栈跟踪吗?
我想找出错误的根本原因是什么以及错误的来源。
回溯(最近调用最后):
1. File "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensio ns\Microsoft\Python Tools for Visual Studio.1\visualstudio_py_util.py", line 1 06, in exec_file
exec_code(code, file, global_variables)
2. File "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensio ns\Microsoft\Python Tools for Visual Studio.1\visualstudio_py_util.py", line 8 2, in exec_code
exec(code_obj, global_variables)
3. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 332, in <module>
main()
4. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 296, in main
stanoxDetails = checkTheLineHasStanox(lastLineSegment)
5. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 205, in checkTheLineHasStanox
firstrow= query(queryStr, 'GetOne')
6. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 45, in query
connection.close()
7. File "C:\Python34\lib\site-packages\pypyodbc.py", line 2658, in close
self.rollback()
8. File "C:\Python34\lib\site-packages\pypyodbc.py", line 2581, in rollback
check_success(self, ret)
9. File "C:\Python34\lib\site-packages\pypyodbc.py", line 988, in check_success
ctrl_err(SQL_HANDLE_DBC, ODBC_obj.dbc_h, ret, ODBC_obj.ansi)
10. File "C:\Python34\lib\site-packages\pypyodbc.py", line 966, in ctrl_err
raise DatabaseError(state,err_text) pypyodbc.DatabaseError: ('08S01', '[08S01] [Microsoft][ODBC SQL Server Driver]Co mmunication
link failure')
Press any key to continue . . .
A Python Traceback 将向您显示在错误发生之前正在执行的内容以及出错的行。
在这种情况下,您的模块在这一行引发错误:
File "C:\Python34\lib\site-packages\pypyodbc.py", line 966, in ctrl_err
raise DatabaseError(state,err_text)
此处显示错误文本:
pypyodbc.DatabaseError: ('08S01', '[08S01] [Microsoft][ODBC SQL Server Driver]Communication link failure')
如前所述,回溯显示错误发生之前执行的代码行以及错误本身。 Python 不是本例中错误的直接原因。
考虑:
10. File "C:\Python34\lib\site-packages\pypyodbc.py", line 966, in ctrl_err
raise DatabaseError(state,err_text) pypyodbc.DatabaseError: ('08S01', '[08S01] [Microsoft][ODBC SQL Server Driver]Communication link failure')
这表明 Python 中的错误是 "pass-through" 错误。被调用的数据库驱动程序实际上是错误的原因,Python 只是通过 Python 传递错误。祝你好运。
任何人都可以逐步解释以下堆栈跟踪吗? 我想找出错误的根本原因是什么以及错误的来源。
回溯(最近调用最后):
1. File "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensio ns\Microsoft\Python Tools for Visual Studio.1\visualstudio_py_util.py", line 1 06, in exec_file
exec_code(code, file, global_variables)
2. File "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensio ns\Microsoft\Python Tools for Visual Studio.1\visualstudio_py_util.py", line 8 2, in exec_code
exec(code_obj, global_variables)
3. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 332, in <module>
main()
4. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 296, in main
stanoxDetails = checkTheLineHasStanox(lastLineSegment)
5. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 205, in checkTheLineHasStanox
firstrow= query(queryStr, 'GetOne')
6. File "C:\Users\ssr\FindAllCandidatePathsOfTrain.py", line 45, in query
connection.close()
7. File "C:\Python34\lib\site-packages\pypyodbc.py", line 2658, in close
self.rollback()
8. File "C:\Python34\lib\site-packages\pypyodbc.py", line 2581, in rollback
check_success(self, ret)
9. File "C:\Python34\lib\site-packages\pypyodbc.py", line 988, in check_success
ctrl_err(SQL_HANDLE_DBC, ODBC_obj.dbc_h, ret, ODBC_obj.ansi)
10. File "C:\Python34\lib\site-packages\pypyodbc.py", line 966, in ctrl_err
raise DatabaseError(state,err_text) pypyodbc.DatabaseError: ('08S01', '[08S01] [Microsoft][ODBC SQL Server Driver]Co mmunication
link failure')
Press any key to continue . . .
A Python Traceback 将向您显示在错误发生之前正在执行的内容以及出错的行。
在这种情况下,您的模块在这一行引发错误:
File "C:\Python34\lib\site-packages\pypyodbc.py", line 966, in ctrl_err
raise DatabaseError(state,err_text)
此处显示错误文本:
pypyodbc.DatabaseError: ('08S01', '[08S01] [Microsoft][ODBC SQL Server Driver]Communication link failure')
如前所述,回溯显示错误发生之前执行的代码行以及错误本身。 Python 不是本例中错误的直接原因。
考虑:
10. File "C:\Python34\lib\site-packages\pypyodbc.py", line 966, in ctrl_err
raise DatabaseError(state,err_text) pypyodbc.DatabaseError: ('08S01', '[08S01] [Microsoft][ODBC SQL Server Driver]Communication link failure')
这表明 Python 中的错误是 "pass-through" 错误。被调用的数据库驱动程序实际上是错误的原因,Python 只是通过 Python 传递错误。祝你好运。