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

Fatal Python error: PyThreadState_Get: no current thread #938

Closed
ruebeckscube opened this issue Jul 20, 2016 · 2 comments
Closed

Fatal Python error: PyThreadState_Get: no current thread #938

ruebeckscube opened this issue Jul 20, 2016 · 2 comments
Labels
Milestone

Comments

@ruebeckscube
Copy link

ruebeckscube commented Jul 20, 2016

I've tried installing elpy on two different computers with the same result in both cases. It opens just fine and all the components generally seem to be working, but I periodically get a pop-up window saying that python has quit unexpectedly along with the following Elpy Output:

Output from Backend

There was some unexpected output from the Elpy backend. This is
usually some module that does not use correct logging, but might
indicate a configuration problem.

Output
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread
Fatal Python error: PyThreadState_Get: no current thread

Here's my configuration output: ~/.local doesn't exist, so I don't think that's the problem. I ran some tests on flake8 and it looks like mock was missing, but I installed that and the problem didn't go away. I was unable to find problems with any of the other modules, but it's quite possible I don't know where to look.

Elpy Configuration

Virtualenv........: None
RPC Python........: 2.7.12 (/usr/local/bin/python)
Interactive Python: python (/usr/local/bin/python)
Emacs.............: 24.5.1
Elpy..............: 1.12.0
Jedi..............: 0.9.0
Rope..............: 0.10.3
Importmagic.......: 0.1.7
Autopep8..........: 1.2.4
Yapf..............: 0.11.0
Syntax checker....: flake8 (/usr/local/bin/flake8)

You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.

The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH.

Options

`Raised' text indicates buttons; type RET or click mouse-1 on a button
to invoke its action.  Invoke [+] to expand a group, and [-] to
collapse an expanded group.  Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.

[+]-- Group Elpy
[+]-- Group Python
[+]-- Group Virtual Environments (Pyvenv)
[+]-- Group Completion (Company)
[+]-- Group Call Signatures (ElDoc)
[+]-- Group Inline Errors (Flymake)
[+]-- Group Snippets (YASnippet)
[+]-- Group Directory Grep (rgrep)
[+]-- Group Search as You Type (ido)

Using brewed python + pip for python installs.
Thanks for any help!

@jorgenschaefer jorgenschaefer added this to the v1.13 milestone Jul 22, 2016
@jorgenschaefer
Copy link
Owner

Hello and thanks for the report! The output you get is not from Elpy, but from some other module you have installed. I'm afraid I do not know which module would cause this.

It might be because importmagic tries to import every module it can find, which some (misbehaving, IMHO) modules do not like. You can just ignore the output there, or you can try to uninstall importmagic and see if that solves the problem.

@ruebeckscube
Copy link
Author

I figured it was something like that, but couldn't figure out which module was being cranky.
Uninstalling importmagic did the trick, thanks!

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