i'm trying to run python script which already ran on test environment. already checked if the path correct and if the file in it. checked in shell that the file exist.
current code is :
# Open a file
path = 'C:\\Users\\tzahi.k\\Desktop\\netzer\\'
dirs = os.listdir( path )
fileslst = []
alertsCode = (some data)
# loop over to search the relative file
for file in dirs:
if "ALERTS" in file.upper() :
fileslst.append(file)
fileslst.sort()
#open and modify the latest file
with open(fileslst[-1], 'rb') as csvfile:
csvReader = csv.reader(csvfile)
clean_rows = [row for row in csvReader if not any(alert in row[2] for alert in alertsCode)]
error :
IOError:error 2 no such file or directory:'file name'
when i debug in shell i see the path and files
what am i doing wrong?