language-check icon indicating copy to clipboard operation
language-check copied to clipboard

http://127.0.0.1:8081: Remote end closed connection without response

Open VicVer09 opened this issue 5 years ago • 12 comments

Running on ubuntu18.04. Reinstalled OS a week ago and tried to use language tool only to keep getting the same error.

Installed language tool using upgraded pip pip install --user --upgrade language-check

`Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information.

import language_check tool = language_check.LanguageTool('en-US') text = u'A sentence with a error in the Hitchhiker’s Guide tot he Galaxy' matches = tool.check(text) Traceback (most recent call last): File "/home/victor/.local/lib/python3.6/site-packages/language_check/init.py", line 319, in _get_root with urlopen(url, data, cls._TIMEOUT) as f: File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data) File "/usr/lib/python3.6/urllib/request.py", line 544, in _open '_open', req) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/usr/lib/python3.6/urllib/request.py", line 1346, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/lib/python3.6/urllib/request.py", line 1321, in do_open r = h.getresponse() File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse response.begin() File "/usr/lib/python3.6/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/usr/lib/python3.6/http/client.py", line 266, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/home/victor/.local/lib/python3.6/site-packages/language_check/init.py", line 250, in check root = self._get_root(self._url, self._encode(text, srctext)) File "/home/victor/.local/lib/python3.6/site-packages/language_check/init.py", line 326, in _get_root raise Error('{}: {}'.format(cls._url, e)) language_check.Error: http://127.0.0.1:8081: Remote end closed connection without response

`

VicVer09 avatar Sep 02 '19 22:09 VicVer09

+1, similar circumstance. Upgrade/rebuild of OS from 16.04 to 18.04 LTS, python 3.6.8 , working my way through getting my app up back to a running state, and got this error on the new install.

kinoc avatar Oct 29 '19 08:10 kinoc

Got the same error, working now by adding this line url=url+"/Languages" in _get_root()

skure avatar Nov 06 '19 12:11 skure

Hi, has anyone been able to solve this? Getting the same issue.

richagadgil avatar Nov 12 '19 23:11 richagadgil

@skure can you explain a little more

richagadgil avatar Nov 12 '19 23:11 richagadgil

Edit init.py around line 315 which in my system is ~/.local/lib/python3.6/site-packages/language_check/init.py

line 315: @classmethod def _get_root(cls, url, data=None, num_tries=2): url=url+"/Languages" for n in range(num_tries):

Adding that line seemed to get my instance to start working Let us know if that helps.

kinoc avatar Nov 13 '19 08:11 kinoc

@kinoc it worked perfectly thanks =)

tprei avatar Dec 26 '19 06:12 tprei

@kinoc didn't work for me... Any alternative solution out there?

digital-mine avatar Jan 02 '20 16:01 digital-mine

Hi! Since this project has been abandoned, I started a new fork over at https://github.com/jxmorris12/language_tool_python.

My version supports new versions of Java and LanguageTool. language-check is stuck on Java 8 and LanguageTool 3.2; latest versions are Java 14 and LanguageTool 4.9!

I'm happy to help you with your issue if you raise it over at my repository! Thanks!

jxmorris12 avatar May 01 '20 03:05 jxmorris12

I faced the same issue and I removed the existing Java Installation. And instead installed Java 8 and this worked perfectly fine for me then.

sudo apt-get purge default-jdk
sudo apt-get autoremove
sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre

anant-kumar-0308 avatar Mar 05 '21 19:03 anant-kumar-0308

Many thanks to you guys.

Managed to make this package to work with the version 3.2 of the Java package "Language Tool"

https://languagetool.org/download/LanguageTool-3.2.zip

DykVanDyke avatar May 28 '23 19:05 DykVanDyke

Edit init.py around line 315 which in my system is ~/.local/lib/python3.6/site-packages/language_check/init.py

line 315: @classmethod def _get_root(cls, url, data=None, num_tries=2): url=url+"/Languages" for n in range(num_tries):

Adding that line seemed to get my instance to start working Let us know if that helps.

It worked for me !! thanks

Anvi98 avatar Sep 29 '23 21:09 Anvi98

Edit init.py around line 315 which in my system is ~/.local/lib/python3.6/site-packages/language_check/init.py

line 315: @classmethod def _get_root(cls, url, data=None, num_tries=2): url=url+"/Languages" for n in range(num_tries):

Adding that line seemed to get my instance to start working Let us know if that helps.

It worked for me,too. :D

YY-han avatar Dec 13 '23 13:12 YY-han