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

exited abnormally with code 1 #2009

Open
yinxiuqu opened this issue Jan 16, 2023 · 5 comments
Open

exited abnormally with code 1 #2009

yinxiuqu opened this issue Jan 16, 2023 · 5 comments

Comments

@yinxiuqu
Copy link

Summary

Thank you for reporting to Elpy !

Here is a template to help you do it so your issue can be fixed as
soon as possible. Please replace this paragraph with a summary of
your issue and fill the next sections.

Steps to reproduce

error in process sentinel: elpy-rpc--default-error-callback: peculiar error: "exited abnormally with code 1"
error in process sentinel: peculiar error: "exited abnormally with code 1"

My configuration

OS

debian11

Result of (elpy-config)

original elpy-config,not any change.

Elpy configuration in my init.el

(require 'elpy)
(elpy-enable)
@sedret452-1
Copy link

I had a similar problem but on a Debian machine. Maybe the following notes, can help you too.

For my problem, the "peculiar error: "exited abnormally with code 1" problem came from an inconsistent "rpc-venv" installation. Hence I already had a perfectly running Elpy installation in my system, some time ago, and wanted to re-use Elpy after a longer time. Which lead to the same error that you're describing.

After multiple unsuccessful complete reinstallations, I was able to understand the following:

  • Using Emacs' package manager to install Elpy from Melpa will result not only result in an installation of .el files but also automatically pull a Python package to: ~/.emacs.d/elpa/elpy-20220922.2253/elpy/ (at least on my system)
  • In addition to this, on the very first installation, rpc-venv package/code will be installed too. On my system this goes to: .emacs.d/elpy/rpc-venv/

Apparently, due to a change in my system's default Python environment (going from 3.10.xx to 3.11.xx) the installed for rpc-venv stopped working properly in my environment.

Hard fix that got me working again:

  1. Remove elpy Emacs package via Emacs' package manager
  2. Close that Emacs session
  3. Verify that also rpc-venv is removed (I removed it manually from above mentioned path)
  4. Re-install elpy freshly via Emacs
  5. This causes for me also to pull a fresh rpc-venv installation

Just as general remark: Since, nowadays, we have a shitload of simultaneous alternatives to install packages into a system (via Pypy, apt, Emacs package manager and whatnot) that greatly overlap and create massive inconsistencies, we should start documenting more thoroughly when something may or may not get autopulled into the system.

@shrysr
Copy link

shrysr commented Feb 3, 2023

In my case (setq elpy-rpc-python-command "python") worked on a Ubuntu machine.

@badboybeyer
Copy link

elpy probably needs some code to detect when the venv is pointing to an uninstalled python version, and regenerate the venv for the new python

@chookity-pokk
Copy link

I had a similar problem but on a Debian machine. Maybe the following notes, can help you too.

For my problem, the "peculiar error: "exited abnormally with code 1" problem came from an inconsistent "rpc-venv" installation. Hence I already had a perfectly running Elpy installation in my system, some time ago, and wanted to re-use Elpy after a longer time. Which lead to the same error that you're describing.

After multiple unsuccessful complete reinstallations, I was able to understand the following:

* Using Emacs' package manager to install Elpy from Melpa will result not only result in an installation of `.el` files but also _automatically_ pull a Python package to: `~/.emacs.d/elpa/elpy-20220922.2253/elpy/` (at least on my system)

* In addition to this,  on the very first installation, `rpc-venv` package/code will be installed too.  On my system this goes to: `.emacs.d/elpy/rpc-venv/`

Apparently, due to a change in my system's default Python environment (going from 3.10.xx to 3.11.xx) the installed for rpc-venv stopped working properly in my environment.

Hard fix that got me working again:

1. Remove `elpy` Emacs package via Emacs' package manager

2. Close that Emacs session

3. Verify that also `rpc-venv` is removed (I removed it manually from above mentioned path)

4. Re-install `elpy` freshly via Emacs

5. This causes for me also to pull a fresh `rpc-venv` installation

Just as general remark: Since, nowadays, we have a shitload of simultaneous alternatives to install packages into a system (via Pypy, apt, Emacs package manager and whatnot) that greatly overlap and create massive inconsistencies, we should start documenting more thoroughly when something may or may not get autopulled into the system.

I can confirm that this also worked for me. Deleted elpy, deleted the elpy directory then restarted emacs. After opening a Python file it asked if I wanted to install the rpc dependencies, I said yes and now the errors are gone.

@hexadecagram
Copy link

I am using use-package with the emacs-app MacPorts package. I just upgraded to Ventura 13.4 yesterday and I just had to upgrade MacPorts (and all its packages), rm -fR ~/.emacs.d/elpy, and restart Emacs to get this message to stop showing up. In my case, I did not have to remove and reinstall either the elpy or rpc-venv packages from Emacs.

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

No branches or pull requests

6 participants