Open AiAe opened 5 years ago
What names do your files have? Do they follow the same pattern? Seems like the regex is identifying a file with a month that is either < 1 or > 12.. Probably an edge case that i haven't thought about..
Could you maybe try printing the file name print(item)
on line 52 (or wherever before line 53)?
The image is
Match group 2 is returning '19142914' (sorry for late response)
I get this error:
Traceback (most recent call last): File ".\sort.py", line 86, in <module> main() File ".\sort.py", line 32, in main copyerino(base_output_path, 'images', *structured_collection(pictures)) File ".\sort.py", line 53, in structured_collection clock = pendulum.from_format(match.group(2), 'YYYYMMDD') File "C:\Users\AiAe\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pendulum\__init__.py", line 251, in from_format return datetime(**parts) File "C:\Users\AiAe\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pendulum\__init__.py", line 110, in datetime hour, minute, second, microsecond ValueError: month must be in 1..12
Python version: 3.6.4 OS: Windows 10