2016-07-20 117 views
0
制定出突然

我使用:
調試器不PyCharm

PyCharm 2016.1.4 Build #PY-145.1504, built on May 25, 2016 JRE: 
1.8.0_76-release-b198 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o 

在Mac上:

OSX El Capitan 
Version 10.11.4 

,而不必做我的代碼進行任何更改,我還沒有」不能再啓動調試器了。我仍然可以使用運行沒有任何問題。

另外,如果我只是從終端運行調試器不工作:

/Users/Vandborg/.virtualenvs/hungry/bin/python /Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 54596 --file /Users/Vandborg/dev/dowant/dowant/manage.py runserver 

它拋出一個未處理excetions可以在這裏看到:

/Users/Vandborg/.virtualenvs/hungry/bin/python /Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 54596 --file /Users/Vandborg/dev/dowant/dowant/manage.py runserver 
pydev debugger: process 10046 is connecting 

Connected to pydev debugger (build 145.1504) 
pydev debugger: process 10055 is connecting 

Validating models... 
Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace instance at 0x107455248> 
Traceback (most recent call last): 
    File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 553, in __call__ 
    return self.original_func(*self.args, **self.kwargs) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run 
    self.validate(display_num_errors=True) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/core/management/base.py", line 249, in validate 
    num_errors = get_validation_errors(s, app) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/core/management/validation.py", line 35, in get_validation_errors 
    for (app_name, error) in get_app_errors().items(): 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/db/models/loading.py", line 146, in get_app_errors 
    self._populate() 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/db/models/loading.py", line 61, in _populate 
    self.load_app(app_name, True) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in load_app 
    models = import_module('.models', app_name) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module 
    __import__(name) 
    File "/Users/Vandborg/dev/dowant/dowant/apps/box_helicom/models.py", line 161, in <module> 
    class MessageHelicom(models.Model): 
    File "/Users/Vandborg/dev/dowant/dowant/apps/box_helicom/models.py", line 178, in MessageHelicom 
    from dowant.cart.models import Order 
    File "/Users/Vandborg/dev/dowant/dowant/cart/models.py", line 44, in <module> 
    from dowant.cart.tasks import backend_cache, order_status 
    File "/Users/Vandborg/dev/dowant/dowant/cart/tasks/__init__.py", line 1, in <module> 
    from backend_cache import refresh_order_backend_cache 
    File "/Users/Vandborg/dev/dowant/dowant/cart/tasks/backend_cache.py", line 2, in <module> 
    from dowant.backend.models import OrderBackendCache 
    File "/Users/Vandborg/dev/dowant/dowant/backend/models.py", line 18, in <module> 
    from dowant.backend.tooltips import (tr_class_template, 
    File "/Users/Vandborg/dev/dowant/dowant/backend/tooltips.py", line 53, in <module> 
    '{% load localization %}' 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/template/__init__.py", line 158, in __init__ 
    self.nodelist = compile_string(template_string, origin) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/template/__init__.py", line 186, in compile_string 
    return parser.parse() 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/template/__init__.py", line 282, in parse 
    compiled_result = compile_func(self, token) 
    File "/Users/Vandborg/.virtualenvs/hungry/lib/python2.7/site-packages/django/template/defaulttags.py", line 928, in load 
    (taglib, e)) 
django.template.TemplateSyntaxError: 'localization' is not a valid tag library: ImportError raised loading dowant.templatetags.localization: cannot import name helper_evalifnotquoted 

在dowant代碼.templatetags.localization多年未被觸及。而且它能夠運行,只是在我嘗試將它與調試器一起使用時才這樣做。

+1

這似乎不是一個pycharm的問題,看起來更像是一個問題,你自己的模板標籤和任何'helper_evalifnotquoted'是 – Sayse

+0

是的,人們會想到。但是因爲當我使用Run時它不是問題。多年來,這部分代碼還沒有被觸及。我再次沒有更改任何代碼。它只是從一天到另一天發生。另外我有一位同事運行相同版本的PyCharm,相同的代碼庫,他沒有運行調試器的問題。 :/ –

回答

0

無視。我發現這個問題,在調試和運行中加載了哪些命令,因此helper_evalifnotquoted無法解析。