pictory icon indicating copy to clipboard operation
pictory copied to clipboard

Not able to run the script

Open AiAe opened this issue 5 years ago • 2 comments

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

AiAe avatar Oct 11 '18 21:10 AiAe

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)?

ramonsaraiva avatar Oct 11 '18 21:10 ramonsaraiva

The image is explorer_2018-10-23_15-55-40

Match group 2 is returning '19142914' (sorry for late response)

AiAe avatar Oct 23 '18 12:10 AiAe