unsupported operand type(s) for +: 'Undefined' and 'str'

34 views
Skip to first unread message

zhen li

unread,
Sep 28, 2015, 2:36:53 AM9/28/15
to hue-...@cloudera.org
hi all:
    i just create my app on hue according to http://cloudera.github.io/hue/docs-3.9.0/sdk/sdk.html,but when i visit http://localhost:8000/ and hit the app i got this error.
[28/Sep/2015 14:12:25] [/home/workspace/hueee/hue/desktop/core/src/desktop/middleware.py:91] INFO     Processing exception: unsupported operand type(s) for +: 'Undefined' and 'str': Traceback (most recent call last):
  File "/home/workspace/hueee/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/workspace/hueee/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/home/workspace/hueee/hue/calculator/src/calculator/views.py", line 22, in index
    return render('index.mako', request, dict(date=datetime.datetime.now()))
  File "/home/workspace/hueee/hue/desktop/core/src/desktop/lib/django_util.py", line 227, in render
    **kwargs)
  File "/home/workspace/hueee/hue/desktop/core/src/desktop/lib/django_util.py", line 148, in _render_to_response
    return django_mako.render_to_response(template, *args, **kwargs)
  File "/home/workspace/hueee/hue/desktop/core/src/desktop/lib/django_mako.py", line 125, in render_to_response
    return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs)
  File "/home/workspace/hueee/hue/desktop/core/src/desktop/lib/django_mako.py", line 114, in render_to_string_normal
    result = template.render(**data_dict)
  File "/home/workspace/hueee/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py", line 443, in render
    return runtime._render(self, self.callable_, args, data)
  File "/home/workspace/hueee/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 786, in _render
    **_kwargs_for_callable(callable_, data))
  File "/home/workspace/hueee/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 818, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/home/workspace/hueee/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 844, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/tmpr635wi/calculator/index.mako.py", line 50, in render_body
    __M_writer(escape(unicode(shared.menubar(section='mytab'))))
  File "/tmp/tmpr635wi/calculator/shared_components.mako.py", line 52, in render_menubar
    __M_writer(escape(unicode( static(calculator + '/art/icon_calculator_48.png') )))
TypeError: unsupported operand type(s) for +: 'Undefined' and 'str'.


BUT when i remove the
${shared.menubar(section='mytab')}
in the index.mako, it works. Any one give me a help

Romain Rigaux

unread,
Sep 28, 2015, 2:55:56 AM9/28/15
to zhen li, Hue-Users
Could you do a fresh clone? this was fixed in master recently AFAIK

To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Reply all
Reply to author
Forward
0 new messages