python大牛们,请拯救下入门级的我,运行别人的程序时,一直报windowserroe:3

File "H:\data_and_plotting_scripts\plotting_scripts\forgetting_bar_chart.py", line 233, in
for folder in os.listdir(fullPath):
WindowsError: [Error 3] : '.cost0wMod/*.*
下面附部分程序:
for folder in os.listdir(fullPath):
if fnmatch.fnmatch(folder, 'run_*'):
runPath = fullPath + "/" + folder

        for file in os.listdir(runPath):
            if fnmatch.fnmatch(file, fileToLookFor):
                numIndividuals+=1
                lines = open(runPath+"/"+file)
                for line in lines:

                    if "Nr of seasons we solve all" in line:
                      if cost:
                        perfectSolveValueswCost.append(float(line.split()[-1]))
                      else:
                        perfectSolveValuesnoCost.append(float(line.split()[-1]))
                    elif "Nr of seasons we forgot something" in line:
                      if cost:
                        forgettingValueswCost.append(float(line.split()[-1]))
                      else:
                        forgettingValuesnoCost.append(float(line.split()[-1]))
                    elif "Nr of items known" in line:
                      if cost:
                        knownItemswCost.append(float(line.split()[-1]))
                      else:
                        knownItemsnoCost.append(float(line.split()[-1]))
                    elif "Nr of items forgotten" in line:
                      if cost:
                        forgottenItemswCost.append(float(line.split()[-1]))
                      else:
                        forgottenItemsnoCost.append(float(line.split()[-1]))
                    elif "Nr of items retained" in line:
                      if cost:
                        retainedItemswCost.append(float(line.split()[-1]))
                      else:
                        retainedItemsnoCost.append(float(line.split()[-1]))
                    elif "Total number of seasons" in line:
                      totalNrOfSeasons = float(line.split()[-1])

print "num individuals for treatment ", treatment, " was ", numIndividuals

最近一直在关注这个问题,难道是文件位置的原因?

fullPath的问题,fullPath格式不正确或者不存在