dateparser icon indicating copy to clipboard operation
dateparser copied to clipboard

Dateparser doesnt work with latest regex on m1 mac

Open anshuman852 opened this issue 2 years ago • 3 comments

To fix this i had to downgrade regex to regex==2021.9.30 Here is the log- `Python 3.10.0 (v3.10.0:b494f5935c, Oct 4 2021, 14:59:19) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import dateparser Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dateparser/init.py", line 3, in from .date import DateDataParser File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dateparser/date.py", line 6, in import regex as re File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/regex/init.py", line 1, in from .regex import * File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/regex/regex.py", line 419, in import regex._regex_core as _regex_core File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/regex/_regex_core.py", line 21, in import regex._regex as _regex ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/regex/_regex.cpython-310-darwin.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/regex/_regex.cpython-310-darwin.so: code signature in (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/regex/_regex.cpython-310-darwin.so) not valid for use in process using Library Validation: Trying to load an unsigned library `

anshuman852 avatar Oct 20 '21 14:10 anshuman852

Got the info from https://github.com/aws/aws-sam-cli/issues/3370#issuecomment-946012467

anshuman852 avatar Oct 20 '21 14:10 anshuman852

This is an upstream issue. It’s not that dateparser specifically does not work with the latest regex, it’s that the latest regex fails to install. They need to fix that upstream.

Gallaecio avatar Oct 20 '21 16:10 Gallaecio

Well, I guess we can monitor the situation, and if there is no upstream fix by the time we release the next version of dateparser, maybe we can do something on our end. However, I would prefer to let them fix it, anything else would be a bit hacky.

Gallaecio avatar Oct 20 '21 16:10 Gallaecio

Hi @Gallaecio I guess we can close this issue. I have an m1 mac, and everything works fine on my laptop:

regex                 2022.3.2
dateparser            1.1.2

and

❯ python
Python 3.10.6 (main, Sep  5 2022, 11:52:06) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dateparser
>>>

Hi, @anshuman852 Could you please approve that everything works fine?

serhii73 avatar Oct 21 '22 15:10 serhii73

@serhii73 The latest regex is 2022.9.13, could you check with that one?

Gallaecio avatar Oct 21 '22 15:10 Gallaecio

Closing as a duplicate of https://github.com/scrapinghub/dateparser/issues/1052 (this issue is older, but the linked one has a longer conversation)

Gallaecio avatar Oct 21 '22 16:10 Gallaecio