[英]SystemError: error return without exception set, when using requests and debugger
環境:Python 3.6.3請求2.18.4 PyCharm 2018.1
在正常運行中使用上述配置時一切都很好。 但是,當使用PyCharm調試器時,我的輸出不斷給出兩種例外:
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):
要么
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):
`
這不是單個項目中的問題,我在無數個項目中無數次地遇到過這個問題。 但是,每個項目都是多線程的(我不知道這是否有任何區別)事情是我沒有使用調試器時沒有這個問題加上它沒有真正做任何事情,應用程序是穩定的並且工作正常。 我的問題是為什么會發生這種情況,我能否至少壓制它以免污染我的日志?
為了防止其他googlers,在Pycharm 2019中,我發現我在我的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'),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.