Я перенес планы тестирования, случаи из среды testopia в kiwi tcms.Большинство планов и дел в порядке.Но при просмотре тестовых случаев в некоторых планах тестирования выдается ошибка AttributeError в / case / 57286 /.что может быть причиной этого?
Ниже приведена трассировка стека от ошибки.
Метод запроса: URL запроса POST: http://*******:8000/plans/printable/
Версия Django: 2.1.3 PythonВерсия: 3.6.1 Установленные приложения:
['vinaigrette',
'grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'attachments',
'django_comments',
'modernrpc',
'simple_history',
'tcms.core',
'tcms.kiwi_auth',
'tcms.core.contrib.comments.apps.AppConfig',
'tcms.core.contrib.linkreference',
'tcms.management',
'tcms.testcases.apps.AppConfig',
'tcms.testplans.apps.AppConfig',
'tcms.testruns.apps.AppConfig',
'tcms.xmlrpc',
'debug_toolbar',
'django_extensions']
Installed Middleware:
['django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'tcms.core.middleware.CsrfDisableMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'global_login_required.GlobalLoginRequiredMiddleware',
'simple_history.middleware.HistoryRequestMiddleware',
'tcms.core.middleware.CheckSettingsMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']
Template error:
In template /hms/apps/Kiwi/tcms/templates/case/printable.html, error at line 57
'NoneType' object has no attribute 'strip'
47 : <div>
48 : <h2 id="plan_cases">Test Cases</h2>
49 : <div class="thick-line"></div>
50 : {% for case_id, test_cases in test_cases.items %}
51 : <div style="clear: left">
52 : {% for test_case in test_cases %}
53 : <h3>TC-{{ test_case.case_id }}: {{ test_case.case__summary }}</h3>
54 : <div class="thin-line"></div>
55 : <div class="case-stage">
56 : <h4>Set up</h4>
57 : {{ test_case.setup|markdown2html }}
58 : </div>
59 : <div class="case-stage">
60 : <h4>Actions</h4>
61 : {{ test_case.action|markdown2html }}
62 : </div>
63 : <div class="case-stage">
64 : <h4>Expected Results</h4>
65 : {{ test_case.effect|markdown2html }}
66 : </div>
67 : <div class="case-stage">
Traceback:
File "/home/centos/testenv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/centos/testenv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "/home/centos/testenv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/centos/testenv/lib/python3.6/site-packages/django/views/decorators/http.py" in inner
40. return func(request, *args, **kwargs)
File "/hms/apps/Kiwi/tcms/testplans/views.py" in printable
650. return testcases_printable(request)
File "/home/centos/testenv/lib/python3.6/site-packages/django/views/decorators/http.py" in inner
40. return func(request, *args, **kwargs)
File "/hms/apps/Kiwi/tcms/testcases/views.py" in printable
882. return render(request, template_name, context_data)
File "/home/centos/testenv/lib/python3.6/site-packages/django/shortcuts.py" in render
36. content = loader.render_to_string(template_name, context, request, using=using)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/loader.py" in render_to_string
62. return template.render(context, request)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/backends/django.py" in render
61. return self.template.render(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in render
171. return self._render(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
96. return self.nodelist.render(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/defaulttags.py" in render
209. nodelist.append(node.render_annotated(context))
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/defaulttags.py" in render
209. nodelist.append(node.render_annotated(context))
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in render
987. output = self.filter_expression.resolve(context)
File "/home/centos/testenv/lib/python3.6/site-packages/django/template/base.py" in resolve
698. new_obj = func(obj, *arg_vals)
File "/hms/apps/Kiwi/tcms/core/templatetags/extra_filters.py" in markdown2html
20. extensions=['markdown.extensions.fenced_code']))
File "/home/centos/testenv/lib/python3.6/site-packages/markdown/core.py" in markdown
391. return md.convert(text)
File "/home/centos/testenv/lib/python3.6/site-packages/markdown/core.py" in convert
252. if not source.strip():
Exception Type: AttributeError at /plans/printable/
Exception Value: 'NoneType' object has no attribute 'strip'
Спасибо