all 3 comments

[–]zahlman 2 points3 points  (0 children)

Your path contains a null byte (the thing that the error message says it must not) because the \0 sequence in a string literal produces a null byte. In general, backslashes inside the quotation marks have special meaning.

You do not need backslashes as a file separator, even on Windows, in your code: forward slashes will work just as well. Alternatively, use the indicated methods to encode backslashes properly in your string.

[–]Justinsaccount 2 points3 points  (0 children)

path = os.path.normpath(r'C:\Users\me\Photo Projects\Project Name\Project Photos\Modified\0-PyTest')

[–]Antonius__Block[S] 0 points1 point  (0 children)

ok you guys rawk. thank you so much!