Ticket #29400: django.tb

File django.tb, 6.3 KB (added by Torsten Bronger, 2 years ago)

Taceback when using @mark_safe with a template filter function.

Line 
1Environment:
2
3
4Request Method: GET
5Request URL: http://demo.juliabase.org/samples/*00001
6
7Django Version: 2.0.5
8Python Version: 3.5.3
9Installed Applications:
10['django.contrib.auth',
11 'django.contrib.contenttypes',
12 'django.contrib.sessions',
13 'django.contrib.admin',
14 'django.contrib.messages',
15 'django.contrib.staticfiles',
16 'django.contrib.humanize',
17 'institute',
18 'jb_plus',
19 'samples',
20 'jb_common']
21Installed Middleware:
22['django.middleware.common.CommonMiddleware',
23 'django.contrib.sessions.middleware.SessionMiddleware',
24 'jb_common.middleware.MessageMiddleware',
25 'django.middleware.locale.LocaleMiddleware',
26 'django.contrib.auth.middleware.AuthenticationMiddleware',
27 'jb_common.middleware.LocaleMiddleware',
28 'samples.middleware.juliabase.ExceptionsMiddleware',
29 'jb_common.middleware.JSONClientMiddleware',
30 'jb_common.middleware.UserTracebackMiddleware']
31
32
33Template error:
34In template /var/www/juliabase/jb-plus/institute/templates/samples/show_substrate.html, error at line 32
35   markdown_samples requires 0 arguments, 1 provided
36   22 :
37   23 : {% load i18n %}
38   24 : {% load samples_extras %}
39   25 :
40   26 : <p>
41   27 :   {% trans 'Material' %}: <strong>{{ process.get_material_display }}</strong>
42   28 : </p>
43   29 :
44   30 : {% if process.comments %}
45   31 :   <blockquote>
46   32 :      {{ process.comments|markdown_samples }}
47   33 :   </blockquote>
48   34 : {% endif %}
49   35 :
50
51Traceback:
52
53File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py" in inner
54  35.             response = get_response(request)
55
56File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
57  128.                 response = self.process_exception_by_middleware(e, request)
58
59File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
60  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
61
62File "/usr/lib/python3.5/contextlib.py" in inner
63  30.                 return func(*args, **kwds)
64
65File "/var/www/juliabase/jb-plus/juliabase/jb_common/utils/base.py" in __call__
66  267.         return self.original_view_function(request, *args, **kwargs)
67
68File "/usr/local/lib/python3.5/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view
69  21.                 return view_func(request, *args, **kwargs)
70
71File "/var/www/juliabase/jb-plus/juliabase/jb_common/utils/base.py" in unquoting_view
72  832.                     **{key: urllib.parse.unquote(value) for key, value in kwargs.items()})
73
74File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/http.py" in inner
75  99.                 response = func(request, *args, **kwargs)
76
77File "/var/www/juliabase/jb-plus/juliabase/samples/views/sample.py" in show
78  731.         samples_and_processes = SamplesAndProcesses.samples_and_processes(sample_name, request.user)
79
80File "/var/www/juliabase/jb-plus/juliabase/samples/views/sample.py" in samples_and_processes
81  342.             samples_and_processes = SamplesAndProcesses(sample, clearance, user, post_data)
82
83File "/var/www/juliabase/jb-plus/juliabase/samples/views/sample.py" in __init__
84  412.         collect_process_contexts()
85
86File "/var/www/juliabase/jb-plus/juliabase/samples/views/sample.py" in collect_process_contexts
87  409.                 process_context = utils.digest_process(process, user, local_context)
88
89File "/var/www/juliabase/jb-plus/juliabase/samples/utils/views/base.py" in digest_process
90  424.         process_context = process.get_context_for_user(user, local_context)
91
92File "/var/www/juliabase/jb-plus/juliabase/samples/models/common.py" in get_context_for_user
93  684.         return super().get_context_for_user(user, context)
94
95File "/var/www/juliabase/jb-plus/juliabase/samples/models/common.py" in get_context_for_user
96  509.                 "samples/show_" + camel_case_to_underscores(self.__class__.__name__) + ".html", context)
97
98File "/usr/local/lib/python3.5/dist-packages/django/template/loader.py" in render_to_string
99  61.         template = get_template(template_name, using=using)
100
101File "/usr/local/lib/python3.5/dist-packages/django/template/loader.py" in get_template
102  15.             return engine.get_template(template_name)
103
104File "/usr/local/lib/python3.5/dist-packages/django/template/backends/django.py" in get_template
105  34.             return Template(self.engine.get_template(template_name), self)
106
107File "/usr/local/lib/python3.5/dist-packages/django/template/engine.py" in get_template
108  144.         template, origin = self.find_template(template_name)
109
110File "/usr/local/lib/python3.5/dist-packages/django/template/engine.py" in find_template
111  126.                 template = loader.get_template(name, skip=skip)
112
113File "/usr/local/lib/python3.5/dist-packages/django/template/loaders/base.py" in get_template
114  30.                     contents, origin, origin.template_name, self.engine,
115
116File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in __init__
117  160.         self.nodelist = self.compile_nodelist()
118
119File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in compile_nodelist
120  198.             return parser.parse()
121
122File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in parse
123  483.                     raise self.error(token, e)
124
125File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in parse
126  481.                     compiled_result = compile_func(self, token)
127
128File "/usr/local/lib/python3.5/dist-packages/django/template/defaulttags.py" in do_if
129  956.     nodelist = parser.parse(('elif', 'else', 'endif'))
130
131File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in parse
132  454.                     raise self.error(token, e)
133
134File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in parse
135  452.                     filter_expression = self.compile_filter(token.contents)
136
137File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in compile_filter
138  568.         return FilterExpression(token, self)
139
140File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in __init__
141  663.                 self.args_check(filter_name, filter_func, args)
142
143File "/usr/local/lib/python3.5/dist-packages/django/template/base.py" in args_check
144  723.                                       (name, alen - dlen, plen))
145
146Exception Type: TemplateSyntaxError at /samples/*00001
147Exception Value: markdown_samples requires 0 arguments, 1 provided
Back to Top