Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno 111 #79

Open
sdspieg opened this issue Aug 15, 2023 · 0 comments
Open

Errno 111 #79

sdspieg opened this issue Aug 15, 2023 · 0 comments
Labels
question Further information is requested Windows bugs that only apply to Windows

Comments

@sdspieg
Copy link

sdspieg commented Aug 15, 2023

When running this code
`import language_tool_python
import pandas as pd
from tqdm.auto import tqdm

tool = language_tool_python.LanguageTool('en-US')
tool._url = 'http://localhost:9888/v2/' # Manually set the server URL

def count_grammar_mistakes(text):
matches = tool.check(text)
return len(matches)

sample_text = "I wants much foods"
print(f"Number of grammar mistakes in the sample text: {count_grammar_mistakes(sample_text)}")
`

I get this error:

LanguageToolError: http://localhost:9888/v2/: HTTPConnectionPool(host='localhost', port=9888): Max retries exceeded with url: /v2/check?language=en-US&text=I+wants+many+foods (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused'))
This is on a Windows machine, running the code from a Jupyter Notebook in VSC under WSL. The server is up and works when I feed it
http://localhost:9888/v2/check?language=en-US&text=I+wants+much+foods
This happens even when I pause my firewall for a few minutes. Any ideas?

@jxmorris12 jxmorris12 added question Further information is requested Windows bugs that only apply to Windows labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Windows bugs that only apply to Windows
Projects
None yet
Development

No branches or pull requests

2 participants