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

Cannot open load file for json-rpc #76

Open
fiddleyuan opened this issue Mar 15, 2021 · 4 comments
Open

Cannot open load file for json-rpc #76

fiddleyuan opened this issue Mar 15, 2021 · 4 comments

Comments

@fiddleyuan
Copy link

I couldn't load nnreddit, so I followed the instruction to run make test-run-interactive, and finally gave me a Lisp error:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "json-rpc")
require(json-rpc)
eval-buffer(#<buffer load> nil "/usr2/fiddle/temp/nnreddit/lisp/nnreddit.el" nil t) ; Reading at buffer position 1532
load-with-code-conversion("/usr2/fiddle/temp/nnreddit/lisp/nnreddit.el" "/usr2/fiddle/temp/nnreddit/lisp/nnreddit.el" nil t)
require(nnreddit)
gnus-get-function((nnreddit "") server-opened)
gnus-server-opened((nnreddit ""))
gnus-start-news-server(nil)
gnus-1(nil nil nil)
gnus(nil)
funcall-interactively(gnus nil)
call-interactively(gnus nil nil)
command-execute(gnus)
command-line-1(("--eval" "(custom-set-variables (quote (gnus-select-method (..." "--eval" "(setq debug-on-error t)" "--eval" "(fset (quote gnus-y-or-n-p) (function ignore))" "-f" "gnus"))
command-line()
normal-top-level()

Apparently, nnreddit cannot fine json-rpc. But I found in my emacs elpa folder that json-rpc-20200417.1629 folder has been created already.

I've tried to put the following in my init.el file:

(use-package json-rpc)
(use-package nnreddit
:after json-rpc
:init
(setq nnreddit-python-command "python3.5"))

But I got the same error. I am very new to Emacs community, any help will be appreciated, thanks!

@dickmao
Copy link
Owner

dickmao commented Mar 15, 2021

Diagnostic:

emacs -Q --batch -f package-initialize --eval "(progn (add-to-list (quote package-archives) (quote (\"melpa\" . \"https://melpa.org/packages/\"))) (dolist (pkg '(nnreddit json-rpc)) (let ((desc (cadr (assq pkg package-alist)))) (when desc (package-delete desc t)))) (package-refresh-contents) (package-install (quote nnreddit)) (princ (if (locate-library \"json-rpc\") \"all good gemer\n\" \"all bad gemer\n\") #'external-debugging-output))"

It should say "all good" at the end.

@fiddleyuan
Copy link
Author

Diagnostic:

emacs -Q --batch -f package-initialize --eval "(progn (add-to-list (quote package-archives) (quote (\"melpa\" . \"https://melpa.org/packages/\"))) (dolist (pkg '(nnreddit json-rpc)) (let ((desc (cadr (assq pkg package-alist)))) (when desc (package-delete desc t)))) (package-refresh-contents) (package-install (quote nnreddit)) (princ (if (locate-library \"json-rpc\") \"all good gemer\n\" \"all bad gemer\n\") #'external-debugging-output))"

It should say "all good" at the end.

@fiddleyuan
Copy link
Author

Thanks for the help!

Running your diagnostic give me "all good gemer" at the end.

However, when entering gnus, minibuffer shows nnreddit rpc timeout, and then shows the following:

Warning: nnreddit-rpc-call: nnreddit-rpc-request: response timed out; nnreddit-sentinel: process /usr2/fiddle/.virtualenvs/nnreddit-20201130.39-python3.5/bin/python exited abnormally with cod
e 1; nnreddit-rpc-call: nnreddit-rpc-request: response timed out; nnreddit-sentinel: process /usr2/fiddle/.virtualenvs/nnreddit-20201130.39-python3.5/bin/python exited abnormally with code 1;
nnreddit-rpc-call: nnreddit-rpc-request: response timed out; nnreddit-sentinel: process /usr2/fiddle/.virtualenvs/nnreddit-20201130.39-python3.5/bin/python exited abnormally with code 1; nnr
eddit-rpc-call: nnreddit-rpc-request: response timed out; nnreddit-sentinel: process /usr2/fiddle/.virtualenvs/nnreddit-20201130.39-python3.5/bin/python exited abnormally with code 1; nnreddi
t-rpc-call: nnreddit-rpc-request: response timed out; nnreddit-sentinel: process /usr2/fiddle/.virtualenvs/nnreddit-20201130.39-python3.5/bin/python exited abnormally with code 1

If I call "nnreddit-goto-group" to enter a group, say r/emacs, it says "nnreddit-goto-group: failed canonical_spelling of emacs"

@dickmao
Copy link
Owner

dickmao commented Mar 15, 2021

Well, I think you need to go back to make test-run-interactive and work out why the Reddit API daemon process (written in Python) fails to launch.

M-x list-processes shows the stdout and stderr of the daemon.

Repository owner deleted a comment from BrittColwell Apr 10, 2021
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

2 participants