Forum Discussion

wanni's avatar
Occasional Contributor
2 years ago

Imports of unsupported third-party modules

Import using sys_path,there is no problem with the first execution, and the second execution will still report an error, lxml import.

import sys
sys.path.insert(0, r"C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\Extensions\Python\Python38\Lib")
from lxml import etree
def aa():
  html = etree.parse(r"D:\fsdata\cyptube2017\machine.config")
  result = html.xpath("//MachineConfig/TripRecord/@LubricateTripX")

4 Replies