-
Notifications
You must be signed in to change notification settings - Fork 468
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
DateParser throws error when imported on embedded Python. #849
Comments
It looks like they’ve implemented |
The same thing seems to happen when py2exe and similar is used. I tried changing the dateparser\utils\strptime.py so that checks whether 'exec_module' is a loader attribute and if not calls 'load_module' but this does not work. |
I hit this also... can I specify an older version of Dateparser to get around it? |
oh... and I have the same problem with 3.8 |
Should be fixed by #1069 |
The dateparser library uses a exec_module on the _strptime. This causes the import to fail when using the the embedded version of python as the import happens via zipimport and zipimport does not have exec_module() so the following error gets thrown on import dateparser
Steps to Reproduce
Download the python.zip file the link below
https://www.python.org/ftp/python/3.9.0/python-3.9.0-embed-amd64.zip
Uncomment import site in the python39._pth
Download pip from https://bootstrap.pypa.io/get-pip.py and run python get-pip.py to install pip
pip install dateparser
Run python
import dateparser
error above is thrown.
Please do let me know if any further information is required to reproduce problem.
Thanks.
The text was updated successfully, but these errors were encountered: