Afreen
10 hours agoNew Contributor
Sys, Log not defined. getting nnnnNameError
i m using two files. Both the files create via right click on Script>new item>gave a name thn OK Unit1 is a file Unit2 is another created a function in Unit1 and it has simple 'Log.Message('the me...
- 8 hours ago
This is expected behavior with newer Python versions used in TestComplete 15.80.
Starting with Python 3.12+, TestComplete global objects like Log, Sys, and Project are no longer automatically shared across imported script units. Each script unit has its own namespace, so when you import another unit, those global objects are not automatically available in that module, which can result in errors like “Log is not defined.”
SmartBear explains this change and provides recommended approaches in the documentation here:
Working with TestComplete Global Objects in Python 3.13If this resolves your scenario, marking it as the solution helps future readers find it quickly.