NameError: django-line exception
Starting with PyCharm 2019.1, I get the errors below when I start debugging my django 1.9 project. It does seem to startup without any issue, but I'm always suspicious of unknown errors. Anyone have any idea what's going on?
==================================
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 330, in process_net_command
raise NameError(type)
NameError: django-line
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 330, in process_net_command
raise NameError(type)
NameError: django-line
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 330, in process_net_command
raise NameError(type)
NameError: django-line
pydev debugger: process 22670 is connecting
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 330, in process_net_command
raise NameError(type)
NameError: django-line
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 330, in process_net_command
raise NameError(type)
NameError: django-line
请先登录再写评论。
I just found that it apparently has something to do with breakpoints in Django template files. Debugging templates isn't working at all so clearly there's something wrong. HELP!
Hi Jay,
Unfortunately I couldn't reproduce the issue. I've tested with Django==1.9.13 and PyCharm 2019.1.1 and I can successfully debug templates.
Please try:
1. Upgrade to the latest PyCharm if you haven't already: https://www.jetbrains.com/pycharm/download
2. Ensure attaching to subprocesses automatically is enabled in **File | Settings | Build, Execution, Deployment | Python Debugger**
3. Try disabling cython extensions by adding the following environment variables to your run/debug configuration:
PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO
4. Try creating new simple project and see if the issue is reproduced.
The problem was caused by multiple copies of pydevd apparently conflicting with the one you guys forked and changed the name of with 2019.1. All cleared up now.