Unicode-objects must be encoded before hashing
Request Method: | GET |
---|---|
Request URL: | https://mldta.com/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/ |
Django Version: | 1.10.1 |
Exception Type: | TypeError |
Exception Value: | Unicode-objects must be encoded before hashing |
Exception Location: | /home/ubuntu/classifai/django/./authentication/models.py in get_picture, line 38 |
Python Executable: | /home/ubuntu/.local/bin/uwsgi |
Python Version: | 3.8.13 |
Python Path: | ['.', '', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages', '/home/ubuntu/virtualenvs/pgram/lib/python3.7/site-packages', '/home/ubuntu/classifai/django/classifai', '/home/ubuntu/classifai/django'] |
Server time: | Fri, 29 Mar 2024 12:28:18 +0000 |
In template /home/ubuntu/classifai/django/templates/questions/questions.html
, error at line 0
1 | {% load staticfiles %} |
---|---|
2 | {% load i18n %} |
3 | |
4 | |
5 | <link href="{% static 'css/bootcamp.css' %}?v=1" rel="stylesheet"> |
6 | <link href="{% static 'css/questions.css' %}" rel="stylesheet"> |
7 | |
8 | <div id="datasets" class="container py-5"> |
9 | <div class="card "> |
10 | <div class="card-header"> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response, assigned=available_attrs(get_response))
def inner(request):
try:
response = get_response(request)...
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | TypeError('Unicode-objects must be encoded before hashing') |
get_response | <bound method BaseHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fc38a480280>> |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/core/handlers/base.py
in _legacy_get_response
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)
if response:
break
if response is None:
response = self._get_response(request)...
return response
Variable | Value |
---|---|
middleware_method | <bound method SecurityMiddleware.process_request of <django.middleware.security.SecurityMiddleware object at 0x7fc38a4942b0>> |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fc38a480280> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/core/handlers/base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function questions at 0x7fc38a4354c0> |
callback_args | () |
callback_kwargs | {'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fc38a480460>> |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
resolver | <RegexURLResolver 'classifai.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=questions.views.questions, args=(), kwargs={'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}, url_name=questions, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fc38a480280> |
wrapped_callback | <function questions at 0x7fc38a4354c0> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/core/handlers/base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function questions at 0x7fc38a4354c0> |
callback_args | () |
callback_kwargs | {'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fc38a480460>> |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
resolver | <RegexURLResolver 'classifai.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=questions.views.questions, args=(), kwargs={'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}, url_name=questions, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fc38a480280> |
wrapped_callback | <function questions at 0x7fc38a4354c0> |
/home/ubuntu/classifai/django/./questions/views.py
in questions
'dataset_id': dataset_id,
})
# @login_required
def questions(request, dataset_id):
questions = Question.objects.filter(dataset_id=dataset_id).all()
return _questions(request, questions, 'all', dataset_id)...
@login_required
def ask(request, dataset_id):
if request.method == 'POST':
dataset_slug = request.POST['dataset_slug']
Variable | Value |
---|---|
dataset_id | '1005af28-02e6-42d3-a4ae-48648421f70e' |
questions | <QuerySet [<Question: Dataset Licensing information>, <Question: Quality of Dataset.>]> |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
/home/ubuntu/classifai/django/./questions/views.py
in _questions
page = request.GET.get('page')
try:
questions = paginator.page(page)
except PageNotAnInteger:
questions = paginator.page(1)
except EmptyPage:
questions = paginator.page(paginator.num_pages)
return render(request, 'questions/questions.html', {...
'questions': questions,
'active': active,
'dataset_id': dataset_id,
})
Variable | Value |
---|---|
active | 'all' |
dataset_id | '1005af28-02e6-42d3-a4ae-48648421f70e' |
page | None |
paginator | <django.core.paginator.Paginator object at 0x7fc389ec3550> |
questions | <Page 1 of 1> |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/shortcuts.py
in render
def render(request, template_name, context=None, content_type=None, status=None, using=None):
"""
Returns a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
content = loader.render_to_string(template_name, context, request, using=using)...
return HttpResponse(content, content_type, status)
def redirect(to, *args, **kwargs):
"""
Returns an HttpResponseRedirect to the appropriate URL for the arguments
Variable | Value |
---|---|
content_type | None |
context | {'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e', 'questions': <Page 1 of 1>} |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
status | None |
template_name | 'questions/questions.html' |
using | None |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/loader.py
in render_to_string
template_name may be a string or a list of strings.
"""
if isinstance(template_name, (list, tuple)):
template = select_template(template_name, using=using)
else:
template = get_template(template_name, using=using)
return template.render(context, request)...
def _engine_list(using=None):
return engines.all() if using is None else [engines[using]]
Variable | Value |
---|---|
context | {'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e', 'questions': <Page 1 of 1>} |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
template | <django.template.backends.django.Template object at 0x7fc38a1221c0> |
template_name | 'questions/questions.html' |
using | None |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/backends/django.py
in render
@property
def origin(self):
return self.template.origin
def render(self, context=None, request=None):
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
try:
return self.template.render(context)...
except TemplateDoesNotExist as exc:
reraise(exc, self.backend)
def copy_exception(exc, backend=None):
"""
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
request | <WSGIRequest: GET '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/'> |
self | <django.template.backends.django.Template object at 0x7fc38a1221c0> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)...
else:
return self._render(context)
finally:
context.render_context.pop()
def compile_nodelist(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <django.template.base.Template object at 0x7fc389ec3d00> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <django.template.base.Template object at 0x7fc389ec3d00> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('\n' ' </a>\n' ' </div>\n' ' </div>\n' ' </div>\n' '\n' ' <ul class="questions list-group list-group-flush">\n' '\n' ' ') |
bits | ['', '\n', '', '\n\n\n<link href="', '/static/css/bootcamp.css', '?v=1" rel="stylesheet">\n<link href="', '/static/css/questions.css', '" rel="stylesheet">\n' '\n' '<div id="datasets" class="container py-5">\n' ' <div class="card ">\n' ' <div class="card-header">\n' ' Discussion\n' ' </div>\n' '\n' ' <div class="card-block">\n' ' <div class="row">\n' ' <div class="col-sm-8">\n' ' <h4 class="card-title">', '2', ' Topics </h4>\n' ' </div>\n' ' <div class="col-sm-4">\n' ' <a href="', '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/ask/', '" role="button"\n' ' class="question_link btn btn-success mz pull-right">\n' ' <i class="fa fa-bullhorn" aria-hidden="true"></i> ', 'New Topic', '\n' ' </a>\n' ' </div>\n' ' </div>\n' ' </div>\n' '\n' ' <ul class="questions list-group list-group-flush">\n' '\n' ' '] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
node | <For Node: for question in questions, tail_len: 3> |
self | [<django.template.defaulttags.LoadNode object at 0x7fc38a1228e0>, <TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7fc38a122c10>, <TextNode: '\n\n\n<link href="'>, <django.templatetags.static.StaticNode object at 0x7fc38a1222b0>, <TextNode: '?v=1" rel="stylesheet">\n<'>, <django.templatetags.static.StaticNode object at 0x7fc38a122070>, <TextNode: '" rel="stylesheet">\n\n<div'>, <Variable Node: questions|length>, <TextNode: ' Topics </h4>\n '>, <django.template.defaulttags.URLNode object at 0x7fc389dfce80>, <TextNode: '" role="button"\n '>, <django.templatetags.i18n.TranslateNode object at 0x7fc389dfcbe0>, <TextNode: '\n </a>'>, <For Node: for question in questions, tail_len: 3>, <TextNode: '\n\n </ul>\n </div'>, <django.templatetags.static.StaticNode object at 0x7fc389893760>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fc3898933a0>, <TextNode: '"></script>\n\n'>] |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <For Node: for question in questions, tail_len: 3> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/defaulttags.py
in render
unpacked_vars = dict(zip(self.loopvars, item))
pop_context = True
context.update(unpacked_vars)
else:
context[self.loopvars[0]] = item
for node in self.nodelist_loop:
nodelist.append(node.render_annotated(context))...
if pop_context:
# The loop variables were pushed on to the context so pop them
# off again. This is necessary because the tag lets the length
# of loopvars differ to the length of each set of items and we
# don't want to leave any vars from the previous loop on the
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
i | 0 |
item | <Question: Dataset Licensing information> |
len_values | 2 |
loop_dict | {'counter': 1, 'counter0': 0, 'first': True, 'last': False, 'parentloop': {}, 'revcounter': 2, 'revcounter0': 1} |
node | <django.template.loader_tags.IncludeNode object at 0x7fc389893250> |
nodelist | ['\n <li class="list-group-item">\n '] |
num_loopvars | 1 |
parentloop | {} |
pop_context | False |
self | <For Node: for question in questions, tail_len: 3> |
unpack | False |
values | <Page 1 of 1> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <django.template.loader_tags.IncludeNode object at 0x7fc389893250> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/loader_tags.py
in render
values = {
name: var.resolve(context)
for name, var in six.iteritems(self.extra_context)
}
if self.isolated_context:
return template.render(context.new(values))
with context.push(**values):
return template.render(context)...
except Exception:
if context.template.engine.debug:
raise
template_name = getattr(context, 'template_name', None) or 'unknown'
logger.warning(
"Exception raised while rendering {%% include %%} for "
Variable | Value |
---|---|
cache | {'questions/partial_question.html': <django.template.base.Template object at 0x7fc389893b80>} |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <django.template.loader_tags.IncludeNode object at 0x7fc389893250> |
template | <django.template.base.Template object at 0x7fc389893b80> |
template_name | 'questions/partial_question.html' |
values | {'question': <Question: Dataset Licensing information>} |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render
context.render_context.push()
try:
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)
else:
return self._render(context)...
finally:
context.render_context.pop()
def compile_nodelist(self):
"""
Parse and compile the template source into a nodelist. If debug
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <django.template.base.Template object at 0x7fc389893b80> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <django.template.base.Template object at 0x7fc389893b80> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '"><img src="' |
bits | ['', '\n\n<div class="row question_link" href="', '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/156/', '" style="width:100%">\n' '\n' ' <div class="col-1">\n' '\n' ' <div class="btn-group-vertical" role="group" aria-label="Basic ' 'example" style="width:100%">\n' ' <button type="button" class="btn btn-secondary ', '', '">', '0', '</button>\n <button type="button" class="btn btn-secondary ', '', '" disabled>\n' ' <i class="fa fa-comment" aria-hidden="true"></i></button>\n' ' </div>\n' '\n' ' </div>\n' '\n' ' <div class="col-1">\n' '\n' ' <div class="btn-group-vertical" role="group" aria-label="Basic ' 'example" style="width:100%">\n' ' <!--<button type="button" class="btn ' 'btn-secondary"></button>-->\n' ' <button type="button" class="btn btn-secondary" width="20%">', '0', '</button>\n' ' <button type="button" class="btn btn-secondary" width="80%" ' 'disabled><i class="fa fa-star"\n' ' ' 'aria-hidden="true"></i></button>\n' ' </div>\n' ' </div>\n' '\n' '\n' ' <div class="col-10">\n' ' <div class="row">\n' ' <div class="col-sm-12">\n' ' <h3 class="panel-title">\n' '\n' '\n' ' <a href="', '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/156/', '" class="question_link">', 'Dataset Licensing information', '</a>\n' ' </h3>\n' ' <div class="question-description" style="word-wrap: ' 'break-word;">\n' ' ', '<p>Can I use this dataset for research or commercial purposes?</p>', '\n' ' </div>\n' ' </div>\n' ' </div>\n' '\n' ' <div class="row">\n' ' <div class="col-sm-6">\n' ' ', '', '\n' ' </div>\n' '\n' ' <div class="question-user col-sm-6 text-right">\n' ' <a href="', '/user/classifAI/', '"><img src="'] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
node | <Variable Node: question.user.profile.get_picture> |
self | [<django.template.defaulttags.LoadNode object at 0x7fc389792100>, <TextNode: '\n\n<div class="row questio'>, <django.template.defaulttags.URLNode object at 0x7fc389792790>, <TextNode: '" style="width:100%">\n\n '>, <Variable Node: question.has_accepted_answer|yesno:"color-main,">, <TextNode: '">'>, <Variable Node: question.get_answers_count>, <TextNode: '</button>\n <bu'>, <Variable Node: question.has_accepted_answer|yesno:"color-main,">, <TextNode: '" disabled>\n <'>, <Variable Node: question.favorites>, <TextNode: '</button>\n <bu'>, <django.template.defaulttags.URLNode object at 0x7fc38960c130>, <TextNode: '" class="question_link">'>, <Variable Node: question.title>, <TextNode: '</a>\n </h3'>, <Variable Node: question.get_description_preview_as_markdown|safe>, <TextNode: '\n </div>\n '>, <IfNode>, <TextNode: '\n </div>\n\n '>, <django.template.defaulttags.URLNode object at 0x7fc38a020460>, <TextNode: '"><img src="'>, <Variable Node: question.user.profile.get_picture>, <TextNode: '"\n '>, <django.template.defaulttags.URLNode object at 0x7fc38a020e20>, <TextNode: '" class="username">\n '>, <Variable Node: question.user.profile.get_screen_name>, <TextNode: '</a>\n <spa'>, <Variable Node: question.update_date|naturaltime>, <TextNode: '</span>\n </div'>] |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <Variable Node: question.user.profile.get_picture> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in render
self.filter_expression = filter_expression
def __repr__(self):
return "<Variable Node: %s>" % self.filter_expression
def render(self, context):
try:
output = self.filter_expression.resolve(context)...
except UnicodeDecodeError:
# Unicode conversion can fail sometimes for reasons out of our
# control (e.g. exception rendering). In that case, we fail
# quietly.
return ''
return render_value_in_context(output, context)
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <Variable Node: question.user.profile.get_picture> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in resolve
self.filters = filters
self.var = var_obj
def resolve(self, context, ignore_failures=False):
if isinstance(self.var, Variable):
try:
obj = self.var.resolve(context)...
except VariableDoesNotExist:
if ignore_failures:
obj = None
else:
string_if_invalid = context.template.engine.string_if_invalid
if string_if_invalid:
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
ignore_failures | False |
self | <django.template.base.FilterExpression object at 0x7fc38a0205b0> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in resolve
var)
self.lookups = tuple(var.split(VARIABLE_ATTRIBUTE_SEPARATOR))
def resolve(self, context):
"""Resolve this variable against a given context."""
if self.lookups is not None:
# We're dealing with a variable that needs to be resolved
value = self._resolve_lookup(context)...
else:
# We're dealing with a literal, so it's already been "resolved"
value = self.literal
if self.translate:
is_safe = isinstance(value, SafeData)
msgid = value.replace('%', '%%')
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
self | <Variable: 'question.user.profile.get_picture'> |
/home/ubuntu/virtualenvs/pgram/lib/python3.8/site-packages/django/template/base.py
in _resolve_lookup
if callable(current):
if getattr(current, 'do_not_call_in_templates', False):
pass
elif getattr(current, 'alters_data', False):
current = context.template.engine.string_if_invalid
else:
try: # method call (assuming no args required)
current = current()...
except TypeError:
try:
inspect.getcallargs(current)
except TypeError: # arguments *were* required
current = context.template.engine.string_if_invalid # invalid method call
else:
Variable | Value |
---|---|
bit | 'get_picture' |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'questions': <Page 1 of 1>, 'active': 'all', 'dataset_id': '1005af28-02e6-42d3-a4ae-48648421f70e'}] |
current | <bound method Profile.get_picture of <Profile: classifAI>> |
self | <Variable: 'question.user.profile.get_picture'> |
template_name | 'questions/questions.html' |
/home/ubuntu/classifai/django/./authentication/models.py
in get_picture
url = "http://" + str(self.url)
return url
def get_picture(self, size=256):
no_picture = 'retro'
gravatar_url = 'http://www.gravatar.com/avatar/{0}?{1}'.format(
hashlib.md5(self.user.email.lower()).hexdigest(),...
urllib.parse.urlencode({'d': no_picture, 's': str(size)})
)
return gravatar_url
def get_screen_name(self):
try:
Variable | Value |
---|---|
no_picture | 'retro' |
self | <Profile: classifAI> |
size | 256 |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | '' |
DOCUMENT_ROOT | '/usr/share/nginx/html' |
HTTPS | 'on' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'mldta.com' |
HTTP_USER_AGENT | 'claudebot' |
PATH_INFO | '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/' |
QUERY_STRING | '' |
REMOTE_ADDR | '3.236.226.100' |
REMOTE_PORT | '34310' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'https' |
REQUEST_URI | '/dataset/tab/1005af28-02e6-42d3-a4ae-48648421f70e/discussion/' |
SCRIPT_NAME | '' |
SERVER_NAME | 'mldta.com' |
SERVER_PORT | '443' |
SERVER_PROTOCOL | 'HTTP/1.1' |
uwsgi.node | b'ip-172-31-81-172' |
uwsgi.version | b'2.0.20' |
wsgi.errors | <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <uwsgi._Input object at 0x7fc389b05690> |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'https' |
wsgi.version | (1, 0) |
classifai.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ACCOUNT_AUTHENTICATION_METHOD | 'username_email' |
ACCOUNT_EMAIL_REQUIRED | True |
ACCOUNT_EMAIL_VERIFICATION | 'optional' |
ACCOUNT_LOGOUT_ON_GET | True |
ACCOUNT_USERNAME_BLACKLIST | ['admin', 'settings', 'news', 'about', 'help', 'signin', 'signup', 'signout', 'terms', 'privacy', 'cookie', 'new', 'login', 'logout', 'administrator', 'join', 'account', 'username', 'root', 'blog', 'user', 'users', 'billing', 'subscribe', 'reviews', 'review', 'blog', 'blogs', 'edit', 'mail', 'email', 'home', 'job', 'jobs', 'contribute', 'newsletter', 'shop', 'profile', 'register', 'auth', 'authentication', 'campaign', 'config', 'delete', 'remove', 'forum', 'forums', 'download', 'downloads', 'contact', 'blogs', 'feed', 'feeds', 'faq', 'intranet', 'log', 'registration', 'search', 'explore', 'rss', 'support', 'status', 'static', 'media', 'setting', 'css', 'js', 'follow', 'activity', 'questions', 'articles', 'network'] |
ACCOUNT_USERNAME_REQUIRED | True |
ADMINS | [] |
ALGOLIA | {'API_KEY': '********************', 'APPLICATION_ID': 'I3N2CC6I81'} |
ALLOWED_HOSTS | ['pgram.com'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend') |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/home/ubuntu/classifai/django' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
COMMENTS_APP | 'fluent_comments' |
CRISPY_TEMPLATE_PACK | 'bootstrap4' |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'localhost', 'NAME': 'classifai', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'classifai_user'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.gmail.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'classifaistore@gmail.com' |
EMAIL_PORT | 587 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FLUENT_COMMENTS_EXCLUDE_FIELDS | ('url', 'title', 'email', 'name') |
FLUENT_COMMENTS_FIELD_CSS_CLASS | 'col-sm-12' |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['suit', 'suit_redactor', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.postgres', 'django.contrib.humanize', 'django.contrib.sitemaps', 'website', 'warehouse', 'activities', 'authentication', 'questions', 'feeds', 'datasetbundle', 'payments', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.google', 'widget_tweaks', 'django_extensions', 'taggit', 'fluent_comments', 'crispy_forms', 'django_comments', 'threadedcomments', 'social_widgets', 'algoliasearch_django'] |
INTERNAL_IPS | [] |
LANGUAGES | [('en', 'English')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'en' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/var/www/classifai/media/' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ['django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'classifai.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'classifai.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 1 |
SOCIALACCOUNT_PROVIDERS | {'facebook': {'AUTH_PARAMS': {'auth_type': 'reauthenticate'}, 'EXCHANGE_TOKEN': '********************', 'FIELDS': ['id', 'email', 'name', 'first_name', 'last_name', 'verified', 'locale', 'timezone', 'link', 'gender', 'updated_time'], 'LOCALE_FUNC': <function <lambda> at 0x7fc38df78280>, 'METHOD': 'oauth2', 'SCOPE': ['email', 'public_profile', 'user_friends'], 'VERIFIED_EMAIL': False, 'VERSION': 'v2.4'}} |
SOCIAL_AUTH_GITHUB_KEY | '********************' |
SOCIAL_AUTH_GITHUB_SCOPE | ['user:email', 'write:public_key', 'repo'] |
SOCIAL_AUTH_GITHUB_SECRET | '********************' |
STATICFILES_DIRS | ('static',) |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/var/www/classifai/static/' |
STATIC_URL | '/static/' |
STRIPE_PUBLISHABLE_KEY | '********************' |
STRIPE_SECRET_KEY | '********************' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/home/ubuntu/classifai/django/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'classifai.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.