SudachiDict icon indicating copy to clipboard operation
SudachiDict copied to clipboard

downloading sudachidict_core dictionary

Open alejandrojcastaneira opened this issue 4 years ago • 3 comments

Hello,

After trying to install the sudachidict_core dictionary from pip, the process suddenly stops without fully downloading the dictionary. It also happened with the other dictionaries, my internet connection is good and stable. Maybe I'm missing something, but just in case I just wanted to let you know,

Bests regards

alejandrojcastaneira avatar Aug 12 '20 08:08 alejandrojcastaneira

Hi,

Thank you for the notice. That sounds pretty weird.

Do you mind sharing us the error message so we can further investigate?

sorami avatar Aug 12 '20 09:08 sorami

Yes, sure:

/ pip install sudachidict_core
Collecting sudachidict_core
  Downloading SudachiDict-core-20200722.tar.gz (8.8 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/www-data/anaconda3/envs/janzz_services/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i8ew40rs/sudachidict-core/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i8ew40rs/sudachidict-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-i8ew40rs/sudachidict-core/pip-egg-info
         cwd: /tmp/pip-install-i8ew40rs/sudachidict-core/
    Complete output (8 lines):
    Downloading the Sudachi dictionary (It may take a while) ...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-i8ew40rs/sudachidict-core/setup.py", line 44, in <module>
        _, _msg = urlretrieve(ZIP_URL, ZIP_NAME)
      File "/home/www-data/anaconda3/envs/janzz_services/lib/python3.7/urllib/request.py", line 288, in urlretrieve
        % (read, size), result)
    urllib.error.ContentTooShortError: <urlopen error retrieval incomplete: got only 22634188 out of 71114304 bytes>
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

alejandrojcastaneira avatar Aug 12 '20 12:08 alejandrojcastaneira

I managed to build a .whl files with resources included for SudachiDict, like so:

68M dist/SudachiDict_core-20211220-py3-none-any.whl

and confirmed, that the package can be installed and works. @sorami Would you be open to a PR that creates and uploads binary wheel releases to PyPI with resources/system.dic embedded into the package?

peterdemin avatar Jan 25 '22 00:01 peterdemin