HUE-231. hue create_desktop_app error

Review Request #970 — Created Oct. 5, 2010 and submitted

bcwalrus
old-hue
hue
philip
commit 91cfaf60efb524a0e69e3baa5a0d690540e3362d
Author: bc Wong <bcwalrus@cloudera.com>
Date:   Tue Oct 5 21:55:33 2010 -0700

    HUE-231. hue create_desktop_app error


philip
  1. 
      
  2. 
      
kongzhenzhen
  1. Hi philip,
    
    Iā€™m Kongzhenzhen from Huawei,
    I know you solved a problem for hue , @ā€ https://review.cloudera.org/r/970/diff/ā€,
    
    And I have another question to consult you.
    
    When I create a new app named "calculator" for hue , I can browse the new application, But I click on it, an error occurs on the page as following,
    
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Traceback (most recent call last):
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/eventlet-0.9.14-py2.6.egg/eventlet/wsgi.py", line 336, in handle_one_response
        result = self.application(self.environ, start_response)
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/wsgi.py", line 241, in __call__
        response = self.get_response(request)
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 141, in get_response
        return self.handle_uncaught_exception(request, resolver, sys.exc_info())
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 165, in handle_uncaught_exception
        return debug.technical_500_response(request, *exc_info)
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/views/debug.py", line 58, in technical_500_response
        html = reporter.get_traceback_html()
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/views/debug.py", line 83, in get_traceback_html
        if issubclass(self.exc_type, TemplateDoesNotExist):
    TypeError: issubclass() arg 1 must be a class
    
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    
    Would you please help me and give some suggestions. Thank you very much.
     
    
    The following was the log from runcpserver.log
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    [18/Jun/2013 15:08:00 +0000] access       INFO     172.0.0.241 admin - "GET /calculator/ HTTP/1.0"
    [18/Jun/2013 15:08:00 +0000] middleware   INFO     Processing exception: 'str' object has no attribute 'has_hue_permission': Traceback (most recent call last):
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
        response = callback(request, *callback_args, **callback_kwargs)
      File "/opt/hue/hue/calculator/src/calculator/views.py", line 22, in index
        return render('index.mako', request, dict(date=datetime.datetime.now()))
      File "/opt/hue/hue/desktop/core/src/desktop/lib/django_util.py", line 221, in render
        **kwargs)
      File "/opt/hue/hue/desktop/core/src/desktop/lib/django_util.py", line 144, in _render_to_response
        return django_mako.render_to_response(template, *args, **kwargs)
      File "/opt/hue/hue/desktop/core/src/desktop/lib/django_mako.py", line 117, in render_to_response
        return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs)
      File "/opt/hue/hue/desktop/core/src/desktop/lib/django_mako.py", line 106, in render_to_string_normal
        result = template.render(**data_dict)
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/template.py", line 412, in render
        return runtime._render(self, self.callable_, args, data)
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 766, in _render
        **_kwargs_for_callable(callable_, data))
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 798, in _render_context
        _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
      File "/opt/hue/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 824, in _exec_template
        callable_(context, *args, **kwargs)
      File "/tmp/tmpzKFGLg/calculator/index.mako.py", line 44, in render_body
        __M_writer(escape(unicode(commonheader("Calculator", "calculator", "100px"))))
      File "/opt/hue/hue/desktop/core/src/desktop/views.py", line 301, in commonheader
        apps = appmanager.get_apps(user)
      File "/opt/hue/hue/desktop/core/src/desktop/appmanager.py", line 195, in get_apps
        return filter(lambda app: user.has_hue_permission(action="access", app=app.display_name), DESKTOP_APPS)
      File "/opt/hue/hue/desktop/core/src/desktop/appmanager.py", line 195, in <lambda>
        return filter(lambda app: user.has_hue_permission(action="access", app=app.display_name), DESKTOP_APPS)
    AttributeError: 'str' object has no attribute 'has_hue_permission'
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    Regards,
    Kongzhenzhen
    
    1. Hi Kongzhenzhen,
      
      http://groups.google.com/a/cloudera.org/group/hue-user is the correct place to have the community and developers look at your problems or feedback.
      
      Romain
    2. Got it.and thanks for your quickly reply.
  2. 
      
Loading...