-
Notifications
You must be signed in to change notification settings - Fork 466
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
Bad escape characters trigger an exception #1045
Comments
I am seeing the exact same behavior with code that worked just 2 hours ago. This is on macOS. I tested with python 3.8.2, 3.8.5, and 3.10.2 |
Same here. Python 3.7.12, macOS. |
Same here, Python 3.9-slim and 3.10-slim docker images, sample code: from dateparser import parse
parse("7 days ago") Output:
We were using |
dependency update: this commit |
I can confirm that deploying regex==2022.1.18 instead (through conda in my case) makes the bug disappear. |
Caused by behaviour change introduced in mrabarnett/mrab-regex@138970b (released as Change was to now raise on invalid ASCII escape characters in pattern compiling and substitution. Not sure if it's a bug with This will be a problem on all supported platforms and environments (Linux, MacOS, Windows; Python 3.6 to 3.10) |
Introduced by version bump in regex Related to scrapinghub/dateparser#1045
Introduced by version bump in regex Related to scrapinghub/dateparser#1045
Making CI/CD break when installing latest version. Please update the PyPI package too, thanks a lot. |
Hi. I was also faced with the same problem (and thought it was a Mac M1 problem with the
More info in mrabarnett/mrab-regex/issues/459 Here is a problematic pattern but there may be more? |
1. fix gfinance exceptions 2. temporary fix for scrapinghub/dateparser#1045 3. readme update
I can confirm that this issue is NOT specific to MacOS - our CI/CD uses Linux machines and was affected by this. My local machine, running Ubuntu, was also affected. Explicitly pinning |
Thanks for the fix and for writing the library in the first place. This seems to me to be one of the best date parsing libraries, we use it for a lot of data imports. Hoping for a soon pip release as well. Keep up the good work 👍 |
Many thanks for thorough investigation! If anyone's up for a PR with the fix, please go ahead! |
Is it possible to push the version 1.1.1 to pypi please? |
Thank you for raising that, @rerowep. It seems like the PyPI publish action got stuck. It's published now 👍 |
* Fixes problem with regex in datetime: scrapinghub/dateparser#1045 * Fixes flask_celerxext mappings for scheduler. Co-Authored-by: Peter Weber <Peter.Weber@rero.ch>
Patch by thmo (THomas Moschny) taken from scrapinghub/dateparser#1045 (comment). Also relaxes the regex version constraint.
Patch by thmo (THomas Moschny) taken from scrapinghub/dateparser#1045 (comment). Also relaxes the regex version constraint.
Patch by thmo (THomas Moschny) taken from scrapinghub/dateparser#1045 (comment). Also relaxes the regex version constraint.
Patch by thmo (THomas Moschny) taken from scrapinghub/dateparser#1045 (comment). Also relaxes the regex version constraint.
Patch by thmo (THomas Moschny) taken from scrapinghub/dateparser#1045 (comment). Also relaxes the regex version constraint.
Patch by thmo (THomas Moschny) taken from scrapinghub/dateparser#1045 (comment). Also relaxes the regex version constraint.
Reopening until we fix it properly. |
Independently arrived on the same solution as the PR, explanation for the bug here |
Fine. Expecting now a new publish on pypi ! |
until scrapinghub/dateparser#1045 is fixed (cherry picked from commit 8c84572)
Hello everyone,
Tried parsing under python 3.7.5 and 3.9
dateparser.parse('12/12/12')
It also gives the same output for any "valid" input shown in the doc:
Here's the error:
How to reproduce:
Env: windows 10
The text was updated successfully, but these errors were encountered: