mercredi 4 mars 2015

Single class. TypeError: 'module' object is not callable


Vote count:

0




I check every similar issue like this, but still couldn't figure out why I got it.



def ProcessFailureSignatures(self, directory, report_dir):
for element in os.listdir(directory):
full_path = os.path.join(directory, element)
m = re.match('(\d+)_FAILED_Pass(\d+)_(.+)', element)
......

def GatherTestResults(self):
earliest = time.time() - TEST_RESULTS_MAX_AGE_SECONDS

for element in os.listdir(RESULTS_DIR_PATH):
time_struct = time.strptime(element, "%Y-%m-%d_%H-%M-%S")
time_sse = time.mktime(time_struct)

outdir = os.path.join(REPORT_DIR_PATH, self.accurev_info['Basis'], self.rtl, element)
summary_file = os.path.join(RESULTS_DIR_PATH, element, "summary.txt")
perf_file = os.path.join(RESULTS_DIR_PATH, element, "performance_data.xml")

if os.path.isfile(perf_file) and not self.IsTestComplete(perf_file, element):
continue
if(time_sse > earliest):
if os.path.isfile(perf_file):
self.ProcessTestPerformance(perf_file, element)

if os.path.isfile(summary_file):
self.ProcessTestSummary(summary_file, element)

self.ProcessFailureSignatures(os.path(RESULTS_DIR_PATH, element), outdir)
...........


I get the following error. also when I type self.ProcessFailureSignatures in Python win, the function name doesnt appear. I dont understand why this wont be in the scope of the class. As it is written under class above the calling function.



File "fbe_test_analyze.py", line 621, in GatherTestResults
self.ProcessFailureSignatures(os.path(RESULTS_DIR_PATH, element), outdir)
TypeError: 'module' object is not callable


asked 2 mins ago







Single class. TypeError: 'module' object is not callable

Aucun commentaire:

Enregistrer un commentaire