Skip to content

issue for download file to initialize LanguageTool #149

@felixintertek

Description

@felixintertek

Hi, I create a new virtual environment but cannot start to use locally by following example code:
Python: 3.10
language_tool_python: 3.2.1

As I try to use the package by initializing the languagetool locally for first time, it cannot download and unzip the LanguageTool server .jar file

>>> import language_tool_python
>>> tool = language_tool_python.LanguageTool('en-US')

It raises BadZipFile error, as the downloaded file is corrupted, I cannot open the downloaded temp file properly as well

 File "...\env_doc2\lib\site-packages\language_tool_python\download_lt.py", line 234, in download_zip
    unzip_file(temp_name, directory)
  File "...\env_doc2\lib\site-packages\language_tool_python\download_lt.py", line 215, in unzip_file
    with zipfile.ZipFile(temp_file_name, "r") as zip_ref:
  File "...\Python\Python310\lib\zipfile.py", line 1258, in __init__
    self._RealGetContents()
  File "...\Python\Python310\lib\zipfile.py", line 1325, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Would you please assist? Thanks.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions