Closed sudeepjd closed 1 year ago
It looks like they’ve implemented exec_module
for zipimporter
in the upcoming Python 3.10. Assuming no one submits a pull request to fix this for earlier versions of Python, at least there’s that.
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 https://github.com/scrapinghub/dateparser/pull/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.