Forum Discussion

pse's avatar
pse
Occasional Contributor
3 months ago
Solved

Unable to run Keyword Tests after 15.80

Seeing this error when running any test immediately. "Python Runtime error. NameError: name 'aqDateTime' is not defined   Error location... Line: def get_month_from_month_offset(offset):   ret...
  • rraghvani's avatar
    3 months ago

    The latest version of TestComplete comes with Python 3.13. Python has made a number of changes. One of them is treating global as regular scoped objects, which has impacted Python scripts used in TestComplete. See https://support.smartbear.com/testcomplete/docs/scripting/specifics/python_tc_globalobjects.html for more information. You need to update your Python scripts to accommodate this change. Here's an example,

    The old way no longer works as global are now treated as regular scoped objects.The new way, using import aqDateTime

     

    Or passing aqDateTime works.