question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gevent 'BlockingSwitchOutError' exception after updating

See original GitHub issue

After updating VisualStudio to 15.9.4 yesterday, I’m experiencing an unhandled exception from gevent when I perform operations in my application:

 Traceback (most recent call last):
   File "c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 649, in trace_dispatch
     self.do_wait_suspend(thread, frame, event, arg)
   File "c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 134, in do_wait_suspend
     self._args[0].do_wait_suspend(*args, **kwargs)
   File "c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py", line 821, in do_wait_suspend
     time.sleep(0.01)
   File "Q:\t8\tools\lang\python2.7\lib\site-packages\gevent\hub.py", line 159, in sleep
     hub.wait(t)
   File "src\gevent\_hub_primitives.py", line 46, in gevent.__hub_primitives.WaitOperationsGreenlet.wait
   File "src\gevent\_hub_primitives.py", line 55, in gevent.__hub_primitives.WaitOperationsGreenlet.wait
   File "src\gevent\_waiter.py", line 151, in gevent.__waiter.Waiter.get
   File "src\gevent\_greenlet_primitives.py", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
   File "src\gevent\_greenlet_primitives.py", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
   File "src\gevent\_greenlet_primitives.py", line 62, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
   File "src\gevent\_greenlet_primitives.py", line 65, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
   File "src\gevent\_greenlet_primitives.py", line 66, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
 BlockingSwitchOutError: Impossible to call blocking function in the event loop callback

Updating gevent & greenlet to the latest version doesn’t address the issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
huguesvcommented, Dec 14, 2018

Thanks! I’ll move this to ptvsd issue tracker.

0reactions
huguesvcommented, Dec 14, 2018

Issue moved to Microsoft/ptvsd #1073 via ZenHub

Read more comments on GitHub >

github_iconTop Results From Across the Web

gevent 'BlockingSwitchOutError' exception after updating
I do not get this when the "Use legacy debugger" checkbox in Options:Python:Debugging is checked. ... Can you try updating to the latest...
Read more >
BlockingSwitchOutError in debugger after upgrading to ...
Using latest gevent (1.1.2). If I open my old PyCharm (i.e. 2016.1.4), and do the same thing - i.e. start the debugger, set...
Read more >
The Event Loop and the Hub
Raised when an object is used (waited on) by two greenlets independently, meaning the object was entered into a blocking state by one...
Read more >
BlockingSwitchOutError in debugger after ... - YouTrack
After upgrading from PyCharm 2016.1.4 to 2016.2, when running the debugger and setting any breakpoint, PyCharm halts in various places where I have...
Read more >
Ocassional Gevent BlockingSwitchOutError crashes when ...
We are migrating to a new engine (via an env var flag) and I totally forgot to wire up a call to remove()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found