Receiving 'NAMEERROR:name' when I try and execute my code in DEBUG mode
telconstar99 at gmail.com
telconstar99 at gmail.com
Fri Oct 18 11:34:22 EDT 2013
Hello,
I'm writing a testing framework in Jython. My code executes successfully when I RUN my project, however, when I DEBUG my project I receive the following error
SOURCE:NAMEERROR:name 'Load_Configurations' is not defined["NameError: name 'Load_Configurations' is not defined
I'm new to python. I am using execfile because I want to dynamically include files at runtime. I would appreciate assistance in resolving this error so that I can use a debugger on my project. I'm using Netbeans if that matters. Below I've pasted the code in my runner.py file (the file that gets executed):
if __name__ == "__main__":
#Required Imports
import os
import sys
root = os.path.dirname((os.getcwd()))
#Load all my files by walking through my source code
i=1
for r,d,f in os.walk(root + "\\src"):
for files in f:
if (files.endswith(".py") and files!="runner.py" and files!="setup.py" and files!="new_test.py"):
execfile(os.path.join(r,files))
if i==len(f):
i=1
break
i=i+1
#Load Configuration
RunnerSettings.load_config = Load_Configurations(root + '\\configuration.xml')
More information about the Python-list
mailing list