coala-bears icon indicating copy to clipboard operation
coala-bears copied to clipboard

language-check install breaking pipeline

Open bkhanale opened this issue 2 years ago • 3 comments

https://github.com/jxmorris12/language_tool_python seems to be a valid alternative, as language-check is not maintained now.

Related to https://github.com/myint/language-check/issues/25

Running setup.py install for language-check: started
    Running setup.py install for language-check: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-76gvnx54/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/language-check
         cwd: /tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/
    Complete output (35 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/setup.py", line 595, in <module>
        sys.exit(main())
      File "/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/setup.py", line 590, in main
        run_setup_hooks(config)
      File "/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/setup.py", line 561, in run_setup_hooks
        language_tool_hook(config)
      File "/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/setup.py", line 584, in language_tool_hook
        download_lt()
      File "/tmp/pip-install-emarsvh7/language-check_28af75d0fbf84578bb5a2d4e1c063cf4/download_lt.py", line 128, in download_lt
        with closing(urlopen(url)) as u:
      File "/usr/local/lib/python3.6/urllib/request.py", line 223, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
        response = meth(req, response)
      File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/local/lib/python3.6/urllib/request.py", line 564, in error
        result = self._call_chain(*args)
      File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
        result = func(*args)
      File "/usr/local/lib/python3.6/urllib/request.py", line 756, in http_error_302
        return self.parent.open(new, timeout=req.timeout)
      File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
        response = meth(req, response)
      File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
        return self._call_chain(*args)
      File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
        result = func(*args)
      File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 403: Forbidden

bkhanale avatar Jul 11 '21 13:07 bkhanale

Thanks @bkhanale for creating issue, @anshalshukla please have a look if we can make the switch as you mentioned previously. Also, it seems like it's a fork of the original project, so I believe it should be simple enough to make changes to the corresponding bears.

abhishalya avatar Jul 11 '21 13:07 abhishalya

Hi! I fixed similar issue following below steps:

  1. Setup openjdk-8-jdk
  • sudo apt install openjdk-8-jdk
  • sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
  1. Manually download file from https://languagetool.org/download/LanguageTool-3.2.zip
  2. export LANGUAGE_CHECK_DOWNLOAD_HOST="file:///home/lakpa/Downloads/LanguageTool-3.2.zip"
  3. pip install git+https://github.com/myint/language-check

Hope this helps.

Regards

sherpa-lakpa avatar Aug 11 '21 11:08 sherpa-lakpa

@sherpalakpa18 Thanks, but I think it's better to change the upstream dependency instead of using language-check as it's not maintained anymore.

@errfanwadia do you want to have a go with this issue? There's a ref PR above which should also help you.

bkhanale avatar Aug 27 '21 13:08 bkhanale