millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

Ein commands fail: void-variable ein:shared-output-cell #824

Closed hemanta212 closed 2 years ago

hemanta212 commented 2 years ago

OUTPUT of ein:dev-bug-report-template for eg

Debugger entered--Lisp error: (void-variable ein:shared-output-cell)
  byte-code("\306\10\307 \310\311\312\313\314\315\316\11&\6\317\312\320\314\315\316\11&\6\321\312\322\314\323\316\n&\6#\324$\210\306\13\323\325\326\312\327$
  require(ein-shared-output)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\312\313\314\"\210\312\31$
  require(ein-cell)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\207" [require eieio ewoc ein$
  require(ein-worksheet)
  byte-code("\300\301!\210\302\303\304\305!\"\210\302\306\307\305!\"\210\302\310\306\"\210\311\310\312\313#\210\314\305\315\306#\316\305\317\320\321$\207" $
  require(ein-scratchsheet)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\306!\210\300\312!\21$
  require(ein-notebook)
  command-execute(ein:dev-bug-report-template record)
  execute-extended-command(nil "ein:dev-bug-report-template" "ein:dev-bu")
  funcall-interactively(execute-extended-command nil "ein:d

EMACS VERSION: 28.0.90

ENVIRONMENT WSL2 Ubuntu 20.04 LTS

REPRODUCTION: RUN

emacs -Q -f package-initialize --eval "(setq debug-on-error t)"
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

M-x package-refresh-contents RET M-x package-install RET ein RET

Try running ein:run or ein:jupyter* commands or bug report command.

I did read the disclaimer about the package being only tested on stable version and since emacs 28 might be considered a pre-release version, I understand and would still like some help if we can make it work, otherwise feel free to close the issue.

dickmao commented 2 years ago

hermanta

Sounds like you need to evacuate old byte-compiled units, an unpublicized task most emacs users don't realize is necessary when upgrading emacs versions.

/home/dick/gnus/src/emacs-28.0.90.1 \
  -Q -nw -f package-initialize \
  --eval "(setq debug-on-error t)" \
  --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\"))" \
  -f package-refresh-contents \
  --eval "(ignore-errors (mapc #'package-delete (cdr (assq 'ein (package--alist)))))" \
  --eval "(package-install 'ein)" \
  -f ein:run
hemanta212 commented 2 years ago

Thank you a ton for taking the time to reply. So i ran the same command and it worked great.

I then had one theory in mind. So i fired up my regular emacs with configs and all and just did package-install ein It worked but only for that session. Once I closed and open emacs ein stops working

This might be because of the native-compilation that hits after a package gets installed. Non native compiled ein package works but breaks when native compiled.

Sounds like you need to evacuate old byte-compiled units, an unpublicized task most emacs users don't realize is necessary when upgrading emacs versions.

I am sorry I don't seem to understand this but are you saying the same thing here? Or are you saying I need to get rid of some old version emacs' folder somewhere that will make it work.

In any case here are the two log files (Native comp complains about ein-shared-output stuff at last of this file

ein-native-comp.log

Also my error log at start of this issue was actually incomplete and long lines were cut off so just in case,

ein-error.log

Also some permanent form of your original solution that doesn't require to delete and reinstall EIN every single time would also work. Maybe I can skip native-comp for this package or sth?

dickmao commented 2 years ago

Some people swear by native-comp; these people are usually small children. Native-comp remains a half-baked initiative prone to breakage.

Try rm -f /home/pykancha/.cache/emacs/.emacs.custom/elpa/ein-20211225.1355/*.elc and restart a couple times. If that doesn't work, then I'm afraid you're on your own.