每当我尝试运行此程序或进入此程序时,我都会收到此代码。我对 python 很陌生,几乎不知道这种语言,但我试图让这段代码连接到 SQL,并希望有任何希望语法明智,甚至尝试另一种方法。任何事情都非常感谢。
import pyodbc
conn = pyodbc.connect('DRIVER={FreeTDS};Server={********};Port=1433;Database=****;Trusted_Connection=yes;TDS_Version=7.2;')
Current thread 0x76fac010 (most recent call first):
File "/home/pi/NData_GrabS8.py", line 42 in <module>
File "/usr/lib/python3/dist-packages/thonny/shared/thonny/backend.py", line 588 in execute_source
File "/usr/lib/python3/dist-packages/thonny/shared/thonny/backend.py", line 427 in _execute_source_ex
File "/usr/lib/python3/dist-packages/thonny/shared/thonny/backend.py", line 374 in _execute_file
File "/usr/lib/python3/dist-packages/thonny/shared/thonny/backend.py", line 155 in _cmd_Run
File "/usr/lib/python3/dist-packages/thonny/shared/thonny/backend.py", line 119 in handle_command
File "/usr/lib/python3/dist-packages/thonny/shared/thonny/backend.py", line 97 in mainloop
File "/usr/lib/python3/dist-packages/thonny/shared/backend_launcher.py", line 41 in <module>
Resetting ...