GNU bug report logs - #72779
EGLOT pyright bug

Previous Next

Package: emacs;

Reported by: Johann De Waal <njdewaal <at> gmail.com>

Date: Sat, 24 Aug 2024 05:56:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72779 in the body.
You can then email your comments to 72779 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72779; Package emacs. (Sat, 24 Aug 2024 05:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johann De Waal <njdewaal <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 24 Aug 2024 05:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johann De Waal <njdewaal <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: EGLOT pyright bug
Date: Fri, 23 Aug 2024 18:44:41 +0200
[Message part 1 (text/plain, inline)]
Good day, I hope you are well.

I've got a bug to report for eglot.

To reproduce is quite simple, I run eglot in a python buffer and it
immediately exits with message 'exited abnormally with code 1'.

Some notes.
1. Running pyright in the command line works as expected.
2. Pyright was installed using "npm install -g pyright".
   node -v = v20.16.0
   pyright --version = 1.1.377

I've also attached some the logs from the eglot buffer.

Thank you for your time and your work on eglot. Please let me know if
I can improve my bug report in any way.

Kind regards.
[eglot_buffer.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72779; Package emacs. (Sat, 24 Aug 2024 06:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 72779 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johann De Waal <njdewaal <at> gmail.com>, João Távora
 <joaotavora <at> gmail.com>
Cc: 72779 <at> debbugs.gnu.org
Subject: Re: bug#72779: EGLOT pyright bug
Date: Sat, 24 Aug 2024 09:29:48 +0300
> From: Johann De Waal <njdewaal <at> gmail.com>
> Date: Fri, 23 Aug 2024 18:44:41 +0200
> 
> I've got a bug to report for eglot.
> 
> To reproduce is quite simple, I run eglot in a python buffer and it
> immediately exits with message 'exited abnormally with code 1'.
> 
> Some notes.
> 1. Running pyright in the command line works as expected.
> 2. Pyright was installed using "npm install -g pyright".
>    node -v = v20.16.0
>    pyright --version = 1.1.377
> 
> I've also attached some the logs from the eglot buffer.

Not sure it's our problem and not of pyright, but I added João to this
discussion, in the hope that he might have some comments or
suggestions.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72779; Package emacs. (Sat, 24 Aug 2024 09:02:01 GMT) Full text and rfc822 format available.

Message #11 received at 72779 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72779 <at> debbugs.gnu.org, Johann De Waal <njdewaal <at> gmail.com>
Subject: Re: bug#72779: EGLOT pyright bug
Date: Sat, 24 Aug 2024 10:01:02 +0100
On Sat, Aug 24, 2024 at 7:29 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Please let me know if I can improve my bug report in any way.

You can follow https://joaotavora.github.io/eglot/#Troubleshooting-Eglot
pay attention to the part about the emacs -q session.  In that
same shell where "pyright works as expected", you should be able
to start emacs -Q, navigate to a python file, and
C-u M-x eglot RET pyright RET.

pyright is a javascript program. It's possible you have a javascript
environment in your shell which is not your Emacs's session.

Also knowing that pyright in the command line works "as expected"
would manually issuing LSP commands to it from stdin.  I suspect
you haven't done that.

João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72779; Package emacs. (Sat, 24 Aug 2024 10:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 72779 <at> debbugs.gnu.org (full text, mbox):

From: Johann De Waal <njdewaal <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 72779 <at> debbugs.gnu.org
Subject: Re: bug#72779: EGLOT pyright bug
Date: Sat, 24 Aug 2024 12:12:57 +0200
Hello, thank you for your swift responses.

Following the 'emacs -Q' advice I was able to pinpoint the problem.

I had the following in my configs.
  (add-to-list 'eglot-server-programs
           '(python-mode . ("pyright"))
which had to be
  (add-to-list 'eglot-server-programs
           '(python-mode . ("pyright-langserver" "--stdio")))

I had set it in this erroneous manner because I was experimenting with mypy.

Thank you for your help.

Kind regards.


On Sat, 24 Aug 2024 at 10:59, João Távora <joaotavora <at> gmail.com> wrote:
>
> On Sat, Aug 24, 2024 at 7:29 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > > Please let me know if I can improve my bug report in any way.
>
> You can follow https://joaotavora.github.io/eglot/#Troubleshooting-Eglot
> pay attention to the part about the emacs -q session.  In that
> same shell where "pyright works as expected", you should be able
> to start emacs -Q, navigate to a python file, and
> C-u M-x eglot RET pyright RET.
>
> pyright is a javascript program. It's possible you have a javascript
> environment in your shell which is not your Emacs's session.
>
> Also knowing that pyright in the command line works "as expected"
> would manually issuing LSP commands to it from stdin.  I suspect
> you haven't done that.
>
> João




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 29 Aug 2024 11:40:02 GMT) Full text and rfc822 format available.

Notification sent to Johann De Waal <njdewaal <at> gmail.com>:
bug acknowledged by developer. (Thu, 29 Aug 2024 11:40:02 GMT) Full text and rfc822 format available.

Message #19 received at 72779-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johann De Waal <njdewaal <at> gmail.com>
Cc: joaotavora <at> gmail.com, 72779-done <at> debbugs.gnu.org
Subject: Re: bug#72779: EGLOT pyright bug
Date: Thu, 29 Aug 2024 14:38:03 +0300
> From: Johann De Waal <njdewaal <at> gmail.com>
> Date: Sat, 24 Aug 2024 12:12:57 +0200
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 72779 <at> debbugs.gnu.org
> 
> Hello, thank you for your swift responses.
> 
> Following the 'emacs -Q' advice I was able to pinpoint the problem.
> 
> I had the following in my configs.
>   (add-to-list 'eglot-server-programs
>            '(python-mode . ("pyright"))
> which had to be
>   (add-to-list 'eglot-server-programs
>            '(python-mode . ("pyright-langserver" "--stdio")))
> 
> I had set it in this erroneous manner because I was experimenting with mypy.

Thanks to both of you.  I'm therefore closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 Sep 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 316 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.