Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run the script #2

Open
AiAe opened this issue Oct 11, 2018 · 2 comments
Open

Not able to run the script #2

AiAe opened this issue Oct 11, 2018 · 2 comments

Comments

@AiAe
Copy link

AiAe commented Oct 11, 2018

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

@ramonsaraiva
Copy link
Owner

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

@AiAe
Copy link
Author

AiAe commented Oct 23, 2018

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants