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

emacs-jedi on windows? deferred error #83

Closed
vinhdizzo opened this issue Aug 1, 2013 · 8 comments
Closed

emacs-jedi on windows? deferred error #83

vinhdizzo opened this issue Aug 1, 2013 · 8 comments
Labels

Comments

@vinhdizzo
Copy link

Hi,

I'm trying to get emacs-jedi working on my windows laptop (have it working on mac os x and ubuntu). I'm using the same ~/.emacs.d directory (so all the emacs packages are the same across machines), and I have the python dependencies installed (epc and jedi). However, when I'm at a python buffer, I get these messages in the minibuffer:

deferred error : (error Timeout server response.)
deferred error : (error Creating pipe: too many open files)

Hence, autocomplete does not work. Any thoughts on how to fix this or which avenue I should be looking at? Thanks.

@vinhdizzo
Copy link
Author

If I list the processes in emacs, I see the following:

epc:server:10 run epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:11 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:12 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:13 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:14 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:15 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:16 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:17 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:18 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:19 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:2 run *epc:server:2
-- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:20 run epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:21 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:22 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:23 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:24 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:25 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:26 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:27 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:28 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:29 run *epc:server... -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:3 run *epc:server:3
-- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:4 run epc:server:4 -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:5 run epc:server:5 -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:6 run epc:server:6 -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:7 run epc:server:7 -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:8 run epc:server:8 -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
epc:server:9 run epc:server:9 -- python2.7 ~/.emacs.d/emacs-jedi/jediepcserver.py
ispell run -- -- aspell -a -m -B --encoding=utf-8 --sug-mode=ultra
server listen -- -- (network server on local)

@tkf
Copy link
Owner

tkf commented Aug 3, 2013

I'm using the same ~/.emacs.d directory (so all the emacs packages are the same across machines)

You are sharing elc files also? It causes problem when you are using different Emacs versions because elc format is not compatible across different Emacs versions.

The best way to investigate this is to use make tryout but probably installing Make is hard in Windows...
http://tkf.github.io/emacs-jedi/latest/#troubleshooting

Do you see some traceback in relevant _*epc:server:N* (_ is a space and N is a number) buffer? You may be able to open that buffer by M-x epc:pop-to-last-server-process-buffer RET when you get the error.

@vinhdizzo
Copy link
Author

I'm not using elc files. I don't byte compile my code, so I just use the .el files directly. Issues should not be from that.

When I pop to last server process buffer, it goes to the buffer epc:server:2, where the buffer only contains the value "1323" without the quotes.

@vinhdizzo
Copy link
Author

From the troubleshooting page, I ran the function jedi:show-jedi-version and got the message "Timeout server response.".

Does this mean it's a jedi issue in python? When I launch python, I'm able to import jedi. When I do help(jedi), I see this as the file reference: /usr/lib/python2.7/site-packages/jedi-0.6.0-py2.7.egg/jedi/init.py.

I can also import epc and argparse.

Thoughts?

@tkf
Copy link
Owner

tkf commented Aug 3, 2013

My guess is that launching external process in Windows takes long time and that's why you get timeout. Try this:

(setq epc:accept-process-timeout 1000)

This increases timeout to 30 second from 3 second (default).
Default epc:accept-process-timeout is 100.

You may be able to decrease epc:accept-process-timeout a little bit.

@vinhdizzo
Copy link
Author

Will try this in a bit. Just remembered one thing. What port is used for
epc by default? I might have to allow that port on windows. Had to do the
same for sshd. Let me know, thanks.

On Saturday, August 3, 2013, Takafumi Arakaki wrote:

My guess is that launching external process in Windows takes long time and
that's why you get timeout. Try this:

(setq epc:accept-process-timeout 1000)

This increases timeout to 30 second from 3 second (default).
Default epc:accept-process-timeout is 100.

You may be able to decrease epc:accept-process-timeout a little bit.


Reply to this email directly or view it on GitHubhttps://github.com//issues/83#issuecomment-22062862
.

Sent from my telephone

@vinhdizzo
Copy link
Author

You are right this fixes the issue for me! Thanks so much!!!

@tkf
Copy link
Owner

tkf commented Aug 3, 2013

If you find a good epc:accept-process-timeout value for your Windows machine, please report it in kiwanami/emacs-epc#15 (just for a data point).

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

No branches or pull requests

2 participants