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

Unable to parse date , even for simple dates given in docs #16

Open
mohammedyunus009 opened this issue Mar 9, 2019 · 3 comments
Open

Comments

@mohammedyunus009
Copy link

start, end = parse("1995-2010")
Traceback (most recent call last):
File "", line 1, in
File "/home/yunus/.conda/envs/py3-env/lib/python3.7/site-packages/daterangeparser/parse_date_range.py", line 276, in parse
raise ParseException("Couldn't parse resulting datetime")
pyparsing.ParseException: Couldn't parse resulting datetime (at char 0), (line:1, col:1)

@mohammedyunus009 mohammedyunus009 changed the title Unable to parse date , even for simple dates Unable to parse date , even for simple dates given in docs Mar 9, 2019
@chintanp
Copy link

This just started failing for me from today. It was working before. I dont know how. This isnt working on my EC2 ubuntu machine. So could be an OS issue.

@robintw
Copy link
Owner

robintw commented May 26, 2019

I've had a quick look at this, and it seems that a change in pyparsing (a library that daterangeparser uses for its parsing) has caused daterangeparser to fail.

A quick and nasty fix is to downgrade pyparsing to v2.2.2, which works (it seems to be changes in v2.3 that cause the error). You can do this by running pip install pyparsing==2.2.2.

I'll have a look into what I need to change to get it working with the latest version

@robintw
Copy link
Owner

robintw commented May 26, 2019

I've managed to fix this now, and have released v1.3.2 which works with the latest version of PyParsing.

Let me know if this fixes your problem.

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

3 participants