Ask a Question

Importing external python module to test complete

ya_DE
New Contributor

Importing external python module to test complete

Hi , 

I am working on a project with my firm and i am trying to connect to a data base via python scripts.
The problem is whenever i try this code : 

from os import sys
sys.path.insert(0,"C:\Temp\python3.6\Lib\site-packages")
import pymssql

 

the first time it works fine but then on the second execution i get this error testcomplete.PNG

To make it work again i have to start test complete again and also again it works fine first time and on the second execution it does the same error

can you help please its urgent !!! 

2 REPLIES 2
NisHera
Valued Contributor

Not sure why this error comes .......

you can try followings.........

name path as C:\\Temp\\python3.6\\Lib\\site-packages or C:\Temp\python3.6\Lib\\site-packages

 

or place your library @ <TestComplete>\Bin\Extensions\Python\Python36\Lib 

 

are you setting the path only once ? or every time before importing?

AlexKaras
Community Hero

Hi,

 

Does this help: https://community.smartbear.com/t5/TestComplete-Mobile-Application/How-do-i-add-Python-Libraries-and... ?

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: