Forum Discussion

Sjef's avatar
Sjef
Occasional Contributor
2 years ago

Using script in Testcomplete Python runtime error - ModuleNotFoundError: No moduel named 'pyodbc'

Hi there...

We have installed the latest version and checked this:

C:\Program Files (x86)\SmartBear\TestComplete 15\Bin\Extensions\Python\Python310>python.exe -m pip install --upgrade pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
Requirement already satisfied: pip in c:\program files (x86)\smartbear\testcomplete 15\bin\extensions\python\python310\lib\site-packages (23.1.2)

C:\Program Files (x86)\SmartBear\TestComplete 15\Bin\Extensions\Python\Python310>python.exe -m pip install pyodbc --trusted-host pypi.org
Requirement already satisfied: pyodbc in c:\program files (x86)\smartbear\testcomplete 15\bin\extensions\python\python310\lib\site-packages (4.0.39)

But when I want to import the module pyodbc in an script in testcomplete; there' s an error:

What goes wrong ?

Greetings,

Sjef





 

    • Sjef's avatar
      Sjef
      Occasional Contributor

      Dear Rraghvani,

      No I have not read that; I will do this first; thank you

      Greetings,

      Sjef

    • Sjef's avatar
      Sjef
      Occasional Contributor

      We installed the py.odbc module on:

       

      the script doesn't stop by the commando import pyodbc, but now it stops at:


      Python runtime error.

      AttributeError: 'NoneType' object has no attribute 'cursor'


      I don't know what to do now

      Greetings,

      Sjef