Trying to debug a Python script, and keep being this error message:
Traceback (most recent call last):
File "<input>", line 3, in <module>
TypeError: slice indices must be integers or None or have an __index__ method
Since the file names have no integers... this doesn't seem to make any sense. Any suggestions?
import os
inputFolder = "d:\\full"
outputFolder = "d:\\clean"
for path, dir, file in os.walk(inputFolder):
for filename in file:
if filename.endswith(".jpeg", ".jpg"):
inputPath = inputFolder + os.sep + filename
print inputPath
str.endswith
expects a tuple instead of multiple arguments.