Skip to content

Instantly share code, notes, and snippets.

@mazz
Created December 14, 2016 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazz/7271625e3d312bc93e80e0f29fabfa71 to your computer and use it in GitHub Desktop.
Save mazz/7271625e3d312bc93e80e0f29fabfa71 to your computer and use it in GitHub Desktop.
websauna: KeyError: 'full_name'
[22:57:07] [pyramid_debugtoolbar toolbar_tween] Exception at http://localhost:6543/admin/models/user/listing
traceback url: http://localhost:6543/_debug_toolbar/exception?tb=4433257752&token=6227245c7864365c7863355c7865365c7839355c7839345c786362634e5c78313427
Traceback (most recent call last):
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/sqlalchemy/ext/indexable.py", line 313, in fget
value = column_value[self.index]
KeyError: 'full_name'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid_debugtoolbar/toolbar.py", line 215, in toolbar_tween
response = _handler(request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid_debugtoolbar/panels/performance.py", line 57, in resource_timer_handler
result = handler(request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/tweens.py", line 62, in excview_tween
reraise(*attrs['exc_info'])
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/compat.py", line 148, in reraise
raise value
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/tweens.py", line 22, in excview_tween
response = handler(request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid_tm/__init__.py", line 119, in tm_tween
reraise(*exc_info)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid_tm/compat.py", line 15, in reraise
raise value
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid_tm/__init__.py", line 98, in tm_tween
response = handler(request)
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/auth/tweens.py", line 27, in __call__
response = self.handler(request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/router.py", line 158, in handle_request
view_name
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/view.py", line 547, in _call_view
response = view_callable(context, request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/viewderivers.py", line 354, in _authdebug_view
return view(context, request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/viewderivers.py", line 302, in _secured_view
return view(context, request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/viewderivers.py", line 512, in csrf_view
return view(context, request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/viewderivers.py", line 465, in rendered_view
request, result, view_inst, context)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/renderers.py", line 432, in render_view
return self.render_to_response(response, system, request=request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/renderers.py", line 455, in render_to_response
result = self.render(value, system_values, request=request)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid/renderers.py", line 451, in render
result = renderer(value, system_values)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/pyramid_jinja2/__init__.py", line 265, in __call__
return template.render(system)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/crud/templates/crud/listing.html", line 1, in top-level template code
{% extends base_template %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/admin/templates/admin/base.html", line 1, in top-level template code
{% extends "site/base.html" %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/core/templates/site/base.html", line 38, in top-level template code
{% block body %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/core/templates/site/base.html", line 46, in block "body"
{% block main %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/core/templates/site/base.html", line 57, in block "main"
{% block content %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/admin/templates/admin/base.html", line 13, in block "content"
{% block crud_content %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/crud/templates/crud/listing.html", line 21, in block "crud_content"
{% block listing %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/crud/templates/crud/listing.html", line 37, in block "listing"
{% include column.body_template %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/crud/templates/crud/column_body.html", line 3, in top-level template code
{% with target=column.get_navigate_url(instance, request), value=column.get_value(view, obj) %}
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/crud/listing.py", line 67, in get_value
val = getattr(obj, self.id)
File "/Users/maz/webapp/websauna_env/src/websauna/websauna/system/user/usermixin.py", line 106, in friendly_name
full_name = self.full_name
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/sqlalchemy/ext/hybrid.py", line 744, in __get__
return self.fget(instance)
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/sqlalchemy/ext/indexable.py", line 315, in fget
return self._fget_default()
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/sqlalchemy/ext/indexable.py", line 303, in _fget_default
raise AttributeError(self.attr_name)
AttributeError: user_data
@mazz
Copy link
Author

mazz commented Dec 14, 2016

screen_shot_2016-12-13_at_22_59_35

@mazz
Copy link
Author

mazz commented Dec 14, 2016

table users contents:

 id |                 uuid                 |  username   |    email    |                                 password                                  |          created_at           |          updated_at           |        activated_at         | enabled |         last_login_at         | last_login_ip |                user_data                | last_auth_sensitive_operation_at | activation_id 
----+--------------------------------------+-------------+-------------+---------------------------------------------------------------------------+-------------------------------+-------------------------------+-----------------------------+---------+-------------------------------+---------------+-----------------------------------------+----------------------------------+---------------
  1 | c8017a47-1856-4b0d-b8b3-a47aaa1aef09 | foo@bar.com | foo@bar.com | $argon2i$v=19$m=512,t=2,p=2$P5KVV+RsRiq01Eye148v8g$zCyHX27vyif7Ya/25uTDhg | 2016-12-13 22:52:58.443879-05 | 2016-12-13 22:53:28.631828-05 | 2016-12-13 22:52:58.4423-05 | t       | 2016-12-13 22:53:28.629458-05 | 127.0.0.1     | {"registration_source": "command_line"} | 2016-12-13 22:52:58.443892-05    |              
(1 row)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment