Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Environment: Python 3.6.3 Requests 2.18.4 PyCharm 2018.1

When using the above configuration in normal run everything is fine. However,when using PyCharm debugger my output is constantly giving me two kinds of exceptions:

Exception ignored in: <generator object urlsplit.<locals>.<genexpr> at 0x7f69803940a0> Traceback (most recent call last):   File "/usr/lib/python3.6/urllib/parse.py", line 433, in <genexpr>     if not rest or any(c not in '0123456789' for c in rest): 

or

SystemError: error return without exception set Exception ignored in: <generator object iter_slices at 0x7f69803940f8> Traceback (most recent call last):   File "/home/damian/workspace/DofusV2/venv/lib/python3.6/site-packages/requests/utils.py", line 449, in iter_slices     def iter_slices(string, slice_length): ` 

This is not an issue in a single project, I had this issue in numerous projects countless times. However, every project was multi-threaded ( I do not know if this makes any difference) The thing is I do not have this problem when not using the debugger plus it doesn't really do anything the application is stable and works fine. My question is why is this happening and can I at least suppress it so it won't pollute my log?

like image 604
CodeSamurai777 Avatar asked May 16 '18 11:05

CodeSamurai777


1 Answers

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.

like image 101
Guido Avatar answered Sep 17 '22 00:09

Guido