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

RuntimeError: There is no current event loop in thread 'Thread-1' #6

Open
p-enel opened this issue Nov 24, 2020 · 1 comment
Open

Comments

@p-enel
Copy link

p-enel commented Nov 24, 2020

This package looks awesome, I installed it with elpa (I'm using spacemacs).
realgud:pdb works just fine, ipdb by itself works fine as well, but I have a repeating error/traceback when I start realgud:ipdb

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/pierre/Apps/anaconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/pierre/Apps/anaconda3/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pierre/Apps/anaconda3/lib/python3.7/site-packages/IPython/terminal/debugger.py", line 122, in in_thread
    line = self.pt_app.prompt()
  File "/home/pierre/Apps/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/prompt.py", line 1011, in prompt
    return get_event_loop().run_until_complete(self._dumb_prompt(self.message))
  File "/home/pierre/Apps/anaconda3/lib/python3.7/asyncio/events.py", line 644, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-1'.

This error repeats indefinitely, incrementing the thread number at each iteration. It fills up the screen so fast that you get to millions of characters in the buffer in a matter of seconds.

To reproduce this:

  • install realgud and realgud-ipdb (in spacemacs these packages are inserted in dotspacemacs-additional-packages)
  • open a python script
  • realgud is already loaded, but I need to load realgud-ipdb: M-x load-library then realgud-ipdb
  • M-x realgud:ipdb
  • I use the default command: ipdb script.py
  • I get the error above

I checked, all the package dependencies specified in the realgud tutorial are installed.
Thanks for your help and that cool package!

@rocky
Copy link
Contributor

rocky commented Nov 27, 2020

Thanks for the kid words. Open-source software is only as good as people who have the time and are willing to work on it

This project and realgud in general has always been lacking in people helping out.

Personally, I don't use ipdb - I've written and use my own debuggers. (That said, I have no doubt the problem really is in or related to something in realgud core).

If you are interested in investigating and fixing, please do so. I can help with questions you have related to how the code works. Otherwise, I guess this will serve to note there is a problem and maybe someone in the future will be interested in fixing.

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

No branches or pull requests

2 participants