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

Error from syntax checker languagetool: peculiar error: "deleted #12

Open
swarnendubiswas opened this issue Jul 1, 2021 · 9 comments
Open
Labels
question Further information is requested

Comments

@swarnendubiswas
Copy link

Hi,

Suppose I have a text buffer or a file with the following content.

This text has bug but LanguageTool do not finds it.

The flycheck checkers are set as follows.

First checker to run:

  languagetool
    - may enable:              yes
    - LanguageTool server JAR: Found at /home/swarnendu/.emacs.d/etc/languagetool-server.jar
    - LanguageTool API URL:    Not configured
    - next checkers:           proselint

I do not use proselint and have disabled it, so the rest of the Flycheck checkers buffer should not be relevant.

Flycheck-languagetool throws the following error when I invoke flycheck-buffer.

Error from syntax checker languagetool: peculiar error: "deleted
", :host, "localhost", :service, 8081
error in process sentinel: flycheck-languagetool--read-results: peculiar error: "deleted
", :host, "localhost", :service, 8081
error in process sentinel: peculiar error: "deleted
", :host, "localhost", :service, 8081
error in process sentinel: flycheck-languagetool--read-results: peculiar error: "failed with code 111
", :host, "localhost", :service, 8081
error in process sentinel: peculiar error: "failed with code 111
", :host, "localhost", :service, 8081
Error from syntax checker languagetool: peculiar error: "deleted
", :host, "localhost", :service, 8081
error in process sentinel: flycheck-languagetool--read-results: peculiar error: "deleted
", :host, "localhost", :service, 8081
error in process sentinel: peculiar error: "deleted
", :host, "localhost", :service, 8081
error in process sentinel: flycheck-languagetool--read-results: peculiar error: "failed with code 111
", :host, "localhost", :service, 8081
error in process sentinel: peculiar error: "failed with code 111
", :host, "localhost", :service, 8081

Here is my flycheck-languagetool configuration.

;; https://languagetool.org/download/
(use-package flycheck-languagetool
  :after flycheck
  :defines (flycheck-languagetool-commandline-jar flycheck-languagetool-check-time)
  :demand t
  :config
  (setq flycheck-languagetool-commandline-jar (no-littering-expand-etc-file-name
                                               "languagetool-commandline.jar")
        flycheck-languagetool-server-jar (no-littering-expand-etc-file-name
                                          "languagetool-server.jar")
        flycheck-languagetool-check-time 3))
@jcs090218
Copy link
Member

Hmm... I cannot reproduce this error.

Make sure you have valid path for flycheck-languagetool-server-jar and make sure the port is available on your machine, default is 8081.

@mavit
Copy link
Contributor

mavit commented Jul 2, 2021

Also have a look in the buffer *LanguageTool server* (note the leading space) to see if there are any helpful errors there.

@jcs090218 jcs090218 added the question Further information is requested label Jul 10, 2021
@mavit
Copy link
Contributor

mavit commented Nov 7, 2021

Is this fixed by commit b6d0b15?

@pittma
Copy link

pittma commented Jan 29, 2022

Hey all. So I ended up here because I was seeing the same thing on a new installation, MacOS specifically. It was just because I hadn't yet installed the JRE.

@mavit
Copy link
Contributor

mavit commented Feb 19, 2022

I was seeing the same thing on a new installation, MacOS specifically. It was just because I hadn't yet installed the JRE.

With what version of flycheck-languagetool? I had hoped that this has been fixed.

@pittma
Copy link

pittma commented Feb 21, 2022

I was seeing the same thing on a new installation, MacOS specifically. It was just because I hadn't yet installed the JRE.

With what version of flycheck-languagetool? I had hoped that this has been fixed.

I'm running 20211107.1001.

@mavit
Copy link
Contributor

mavit commented Apr 2, 2022

Hmm. What does M-x flycheck-verify-checker languagetool say when a JRE isn't installed? We now check for a java executable before trying to activate the checker, but I wonder if that check fails on MacOS for some reason.

@guilhermecomum
Copy link

@swarnendubiswas are you able to run the language tool server? Did you try run this command: java -cp languagetool-server.jar org.languagetool.server.HTTPServer --port 8081 --allow-origin

@Inc0n
Copy link

Inc0n commented Oct 24, 2022

I have just encountered this problem recently. Do note though I used flymake not flycheck, but since there is a thread here already, and the code seems fairly similar in at least the places I have made some modifications.

I suspect it's because for some reason the server has been started, but the process is not live anymore. For OSX, it would spawn new application named java but is in fact the HTTPServer, I closed it without knowing that which is most likely part of the cause of this error. So now flymake-languagetool--started-server is t, but (process-live-p (get-process "languagetool-server")) returns nil.

What I did for my quick fix was to comment out the following lines:

(unless flymake-languagetool--started-server
      (setq flymake-languagetool--started-server t))

So that flymake-languagetool--start-server will be called every time, but it shouldn't create additional server instances, as there is a process-live-p check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants