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

Could not parse your date #34

Open
tctopic opened this issue Jan 4, 2023 · 2 comments
Open

Could not parse your date #34

tctopic opened this issue Jan 4, 2023 · 2 comments

Comments

@tctopic
Copy link

tctopic commented Jan 4, 2023

This is my code.

s=gn.search('energy digital transformation',helper=True,from_ =date1.strftime("%Y-%m-%d"), to_ =date2.strftime("%Y-%m-%d"))

The following result is obtained.
#Exception: Could not parse your date

Why can't it recognize the date?

@nfallah
Copy link

nfallah commented Feb 5, 2023

I did some research and apparently, it could be the issue with the parsedata module and regex, so I just went into the actual script and removed the part where it needed to parse any data in the first place; so if I already put it in the 'YYYY-MM-DD' format then this alteration would not affect the program whatsoever.

@PaulKMandal
Copy link

I did some research and apparently, it could be the issue with the parsedata module and regex, so I just went into the actual script and removed the part where it needed to parse any data in the first place; so if I already put it in the 'YYYY-MM-DD' format then this alteration would not affect the program whatsoever.

This "fix" doesn't work for me. Putting a string in 'YYYY-MM-DD' will still yield "error: bad escape \d at position 7" and throw the exception "Could not parse your date."

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