-
Notifications
You must be signed in to change notification settings - Fork 89
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
Wrong shebang? #346
Comments
That shebang is overwritten by whatever python is used to install the jediepcserver script. In the repo the shebang is neither of the two values:
Do you have any way of knowing how was the newer jediepcserver installed? |
I used the following emacs command: |
Have the same problem. @Dolgorbie suggestion solved the problem. |
@iharsuvorau @Dolgorbie could you share what are your Also, when you say it doesn't work, could you please share what's the problem? And finally, would be interesting to see what's your Thank you! |
@immerrr sure, thank you for debugging. Here is it: Output of ;; Emacs Lisp version:
(:emacs-version "26.3" :jedi-version "0.2.8" :python-environment-version "0.0.2alpha0")
;; Python version:
nil
;; EPC error:
(:get-epc-error
(wrong-type-argument epc:manager nil))
;; Command line:
(:virtualenv "/usr/local/bin/virtualenv" :virtualenv-version "virtualenv 20.0.10 from /usr/local/lib/python3.7/site-packages/virtualenv/__init__.py\n")
;; Customization:
((jedi:complete-on-dot . t)
(jedi:doc-display-buffer . display-buffer)
(jedi:doc-hook view-mode)
(jedi:doc-mode . rst-mode)
(jedi:environment-root)
(jedi:environment-virtualenv)
(jedi:get-in-function-call-delay . 1000)
(jedi:get-in-function-call-timeout . 3000)
(jedi:goto-definition-config
(nil nil nil)
(t nil nil)
(nil definition nil)
(t definition nil)
(nil nil t)
(t nil t)
(nil definition t)
(t definition t))
(jedi:goto-definition-hook)
(jedi:goto-definition-marker-ring-length . 16)
(jedi:imenu-create-index-function . jedi:create-nested-imenu-index)
(jedi:import-python-el-settings . t)
(jedi:install-imenu)
(jedi:install-python-jedi-dev-command "pip" "install" "--upgrade" "git+https://github.com/davidhalter/jedi.git@master#egg=jedi")
(jedi:key-complete .
[C-tab])
(jedi:key-goto-definition .
[67108910])
(jedi:key-goto-definition-pop-marker .
[67108908])
(jedi:key-related-names . "�r")
(jedi:key-show-doc . "�d")
(jedi:server-args)
(jedi:server-command "/Users/ihar/.emacs.d/elpa/jedi-core-20191011.1750/jediepcserver.py")
(jedi:setup-keys)
(jedi:tooltip-method pos-tip popup)
(jedi:use-shortcuts)
(python-environment-default-root-name . "default")
(python-environment-directory . "~/.emacs.d/.python-environments")
(python-environment-virtualenv "virtualenv" "--system-site-packages" "--quiet")) I have the following errors:
and at the same time in the minibuffer:
Running Running |
Could someone affected by this try the snippet below and show what does it say in It'll install jedi to a different venv and trace the execution. (defvar trace-indent 0)
(defun trace-function (fn-name orig-fun &rest args)
(cl-incf trace-indent)
(unwind-protect
(let ((trace-prefix (make-string (* 2 trace-indent) (string-to-char "="))))
(message "======%s %s called with args %S" trace-prefix fn-name args)
(let ((res (apply orig-fun args)))
(message "======%s %s returned %S" trace-prefix fn-name res)
res))
(cl-decf trace-indent)))
(defun remove-advices (fn-sym)
(advice-mapc (lambda (func props) (advice-remove fn-sym func)) fn-sym))
(defun remove-single-advice (fn-sym func-to-remove)
(advice-mapc (lambda (func props)
(when (equal func func-to-remove)
(advice-remove fn-sym func)))
fn-sym))
(defun add-trace-function (fn-sym)
(lexical-let*
((fn-sym fn-sym)
(trace-fn (lambda (&rest args)
(apply #'trace-function
(format "Function %S" fn-sym)
args))))
(advice-add fn-sym :around trace-fn)
(list fn-sym trace-fn)))
(defun trace-jedi-install-server-block ()
(let* ((jedi:environment-root "jedi-trace-install-server-block")
(funcs-to-advise '(python-environment--blocking-process
python-environment-run-block
python-environment--deferred-process
call-process
deferred-process
jedi:install-server-block
jedi:install-server))
advices)
(unwind-protect
(progn
(mapc (lambda (fn-sym) (push (add-trace-function fn-sym) advices))
funcs-to-advise)
(when (python-environment-exists-p jedi:environment-root)
(delete-directory (python-environment-root-path jedi:environment-root) 'recursive))
(jedi:install-server-block))
(mapc (lambda (advice-info) (apply #'remove-single-advice advice-info))
advices))))
(trace-jedi-install-server-block) |
I have two Mac PCs whose version is 10.14.
I installed Jedi on one of my Macs a years ago
and installed Jedi on the other some days ago.
The older emacs-jedi system works well, but the newer doesn't.
I found a defference between them in ~/.emacs.d/.python-environments/default/bin/jediepcserver.
The shebang of that of correctly working system is:
#!/Users/username/.emacs.d/.python-environments/default/bin/python3.7
But that of broken is:
#!/usr/local/opt/python/bin/python3.7
I rewrote second shebang to first shebang.
Then the broken jedi worked.
The text was updated successfully, but these errors were encountered: