{"action":"created","issue":{"url":"https://api.github.com/repos/quokkaproject/quokka/issues/301","labels_url":"https://api.github.com/repos/quokkaproject/quokka/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/quokkaproject/quokka/issues/301/comments","events_url":"https://api.github.com/repos/quokkaproject/quokka/issues/301/events","html_url":"https://github.com/quokkaproject/quokka/issues/301","id":106483627,"number":301,"title":"\"TypeError: object of type 'NoneType' has no len()\" error","user":{"login":"wangyishuai007","id":14171308,"avatar_url":"https://avatars.githubusercontent.com/u/14171308?v=3","gravatar_id":"","url":"https://api.github.com/users/wangyishuai007","html_url":"https://github.com/wangyishuai007","followers_url":"https://api.github.com/users/wangyishuai007/followers","following_url":"https://api.github.com/users/wangyishuai007/following{/other_user}","gists_url":"https://api.github.com/users/wangyishuai007/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyishuai007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyishuai007/subscriptions","organizations_url":"https://api.github.com/users/wangyishuai007/orgs","repos_url":"https://api.github.com/users/wangyishuai007/repos","events_url":"https://api.github.com/users/wangyishuai007/events{/privacy}","received_events_url":"https://api.github.com/users/wangyishuai007/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-15T05:37:33Z","updated_at":"2015-09-16T02:24:25Z","closed_at":"2015-09-15T12:13:27Z","body":"createuser\r\n-\r\n>[root@xfwy quokka]# python manage.py accounts_createsuperuser \r\n\\--------------------------------------------------------------------------------\r\nINFO in fixtures [/data/git/quokka/quokka/ext/fixtures.py:14]:\r\nLoading fixtures\r\n\\--------------------------------------------------------------------------------\r\nNo handlers could be found for logger \"root\"\r\n\\--------------------------------------------------------------------------------\r\nWARNING in fixtures [/data/git/quokka/quokka/ext/fixtures.py:25]:\r\nCould not create initial user and post\r\n\\--------------------------------------------------------------------------------\r\nName: ^CAborted!\r\n\r\npopulate\r\n-\r\n>(quokka-env)[root@xfwy quokka]# python manage.py populate\r\n15.09 11:55:44 root         INFO     Exist: User: mail: admin@example.com\r\n15.09 11:55:44 root         INFO     ChannelType get: list\r\n15.09 11:55:44 root         INFO     ChannelType get: blog\r\n15.09 11:55:44 root         INFO     ChannelType get: grid\r\n15.09 11:55:44 root         INFO     ChannelType get: portal\r\n15.09 11:55:44 root         INFO     Channel get: Home\r\n15.09 11:55:44 root         INFO     Channel get: Media\r\n15.09 11:55:44 root         INFO     Channel get: Images\r\n15.09 11:55:44 root         INFO     Channel get: Videos\r\n15.09 11:55:44 root         INFO     Channel get: Audios\r\n15.09 11:55:44 root         INFO     Channel get: Files\r\n15.09 11:55:44 root         INFO     Channel get: Galleries\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Created channel: Articles\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Created channel: Technology\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Created channel: Mobile\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Created channel: Programming\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Created channel: Science\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Created channel: Blog\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Channel get: Articles\r\n15.09 11:55:44 root         INFO     Channel get: Blog\r\n15.09 11:55:44 root         INFO     Post get: Python Reaches New Levels of Quality\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Channel get: Articles\r\n15.09 11:55:44 root         INFO     Channel get: Blog\r\n15.09 11:55:44 root         INFO     Post get: Small Acts Make Great Revolutions\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Channel get: Articles\r\n15.09 11:55:44 root         INFO     Channel get: Blog\r\n15.09 11:55:44 root         INFO     Post get: Welcome to Quokka CMS\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Channel get: Articles\r\n15.09 11:55:44 root         INFO     Channel get: Blog\r\n15.09 11:55:44 root         INFO     Post get: Blog Post written in markdown\r\n15.09 11:55:44 root         WARNING  No user found: 'NoneType' object has no attribute 'id'\r\n15.09 11:55:44 root         INFO     Channel get: Articles\r\n15.09 11:55:44 root         INFO     Channel get: Blog\r\n15.09 11:55:44 root         INFO     Post get: Why is Flask a good web framework choice?\r\n\r\nrunserver error\r\n-\r\n>Traceback (most recent call last):\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/views.py\", line 84, in view\r\n    return self.dispatch_request(*args, **kwargs)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/views.py\", line 149, in dispatch_request\r\n    return meth(*args, **kwargs)\r\n  File \"/data/git/quokka/quokka/modules/authors/views.py\", line 27, in get\r\n    author=author, contents=contents)\r\n  File \"/data/git/quokka/quokka/core/templates.py\", line 16, in render_template\r\n    return render_theme_template(theme, template, **context)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/quokka_themes/__init__.py\", line 184, in render_theme_template\r\n    return render_template('_themes/%s/%s' % (theme, last), **context)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/templating.py\", line 128, in render_template\r\n    context, ctx.app)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/templating.py\", line 110, in _render\r\n    rv = template.render(context)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/jinja2/environment.py\", line 989, in render\r\n    return self.environment.handle_exception(exc_info, True)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/jinja2/environment.py\", line 754, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/data/git/quokka/quokka/themes/pure/templates/authors/detail.html\", line 2, in top-level template code\r\n    {% extends theme(\"base.html\") %}\r\n  File \"/data/git/quokka/quokka/themes/pure/templates/base.html\", line 16, in top-level template code\r\n    {% block meta %}{% endblock %}\r\n  File \"/data/git/quokka/quokka/themes/pure/templates/authors/detail.html\", line 17, in block \"meta\"\r\n    <meta property=\"og:description\" content=\"{{ author.bio|truncate(255)|striptags }}\" />\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/jinja2/filters.py\", line 476, in do_truncate\r\n    if len(s) <= length:\r\nTypeError: object of type 'NoneType' has no len()\r\n\r\nThis should be how do?\r\n"},"comment":{"url":"https://api.github.com/repos/quokkaproject/quokka/issues/comments/140606416","html_url":"https://github.com/quokkaproject/quokka/issues/301#issuecomment-140606416","issue_url":"https://api.github.com/repos/quokkaproject/quokka/issues/301","id":140606416,"user":{"login":"wangyishuai007","id":14171308,"avatar_url":"https://avatars.githubusercontent.com/u/14171308?v=3","gravatar_id":"","url":"https://api.github.com/users/wangyishuai007","html_url":"https://github.com/wangyishuai007","followers_url":"https://api.github.com/users/wangyishuai007/followers","following_url":"https://api.github.com/users/wangyishuai007/following{/other_user}","gists_url":"https://api.github.com/users/wangyishuai007/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyishuai007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyishuai007/subscriptions","organizations_url":"https://api.github.com/users/wangyishuai007/orgs","repos_url":"https://api.github.com/users/wangyishuai007/repos","events_url":"https://api.github.com/users/wangyishuai007/events{/privacy}","received_events_url":"https://api.github.com/users/wangyishuai007/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T02:24:25Z","updated_at":"2015-09-16T02:24:25Z","body":"Thank you for your answer\r\nNow, do not report 'typeerror' error, but there is a new error, as follows:\r\nopen http://192.168.1.98:5000/admin/\r\n>Traceback (most recent call last):\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/root/quokka-env/lib/python2.7/site-packages/flask_admin/base.py\", line 64, in inner\r\n    abort = self._handle_view(f.__name__, **kwargs)\r\n  File \"/data/git/quokka/quokka/core/admin/models.py\", line 53, in _handle_view\r\n    if not current_user.is_authenticated():\r\nTypeError: 'bool' object is not callable"}}