SystemError: error return without exception set, when using requests and debugger SystemError: error return without exception set, when using requests and debugger python-3.x python-3.x

SystemError: error return without exception set, when using requests and debugger


I had a similar problem when using Gensim Word2vec models, also using debugger in Python 3.6 / PyCharm 2018.2.Just as a quick fix, I found a solution by setting an environment variable:

PYDEVD_USE_FRAME_EVAL=NO

This can be done easily in PyCharm by settings environment variables in PyCharm run configuration. After setting this variable, I could use debugger again. More info can be found here and here.


Just in case it helps other googlers, in Pycharm 2019 I found I'd caused this error by using a line in my urlpatterns:

# including this line caused the error (I wanted to catch the 'my_special_model' type and use the general one below for other models.      path('display/my_special_model/<int:item_id>/', views.display_model, name='display_model'),# This works fine ...     path('display/<item_type>/<int:item_id>/', views.display, name='display'),