Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-1574

[beeswax] mako template engine setting error : 'ascii' codec can't decode byte error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 3.6.0
    • Component/s: con.hive
    • Labels:
      None
    • Environment:
      1. client
        1. Chrome : 29.0.1547.65
        2. Language : utf-8 (en_US)
      1. Server
      2. LANG=en_US.UTF-8
    • Target Version:
    • Easy:
      Easy

      Description

      1. query name, query description 'utf-8' encoded string error.
      [16/Sep/2013 16:19:54 +0000] /usr/share/hue/desktop/core/src/desktop/log/access.py:91 access       INFO     127.0.0.1 tester - "GET /impala/my_queries HTTP/1.0"
      [16/Sep/2013 16:19:54 +0000] /usr/share/hue/desktop/core/src/desktop/middleware.py:77 middleware   INFO     Processing exception: 'ascii' codec can't decode byte 0xeb in position 0: ordinal not in range(128): Traceback (most recent call last):
        File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/core/handlers/base.py", line 100, in get_response
          response = callback(request, *callback_args, **callback_kwargs)
        File "/usr/share/hue/apps/beeswax/src/beeswax/views.py", line 300, in my_queries
          return render('my_queries.mako', request, {
        File "/usr/share/hue/desktop/core/src/desktop/lib/django_util.py", line 220, in render
          template_lib=template_lib,
        File "/usr/share/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 "/usr/share/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 "/usr/share/hue/desktop/core/src/desktop/lib/django_mako.py", line 106, in render_to_string_normal
          result = template.render(**data_dict)
        File "/usr/share/hue/build/env/lib/python2.4/site-packages/Mako-0.7.2-py2.4.egg/mako/template.py", line 412, in render
          return runtime._render(self, self.callable_, args, data)
        File "/usr/share/hue/build/env/lib/python2.4/site-packages/Mako-0.7.2-py2.4.egg/mako/runtime.py", line 765, in _render
          _render_context(template, callable_, context, *args,
        File "/usr/share/hue/build/env/lib/python2.4/site-packages/Mako-0.7.2-py2.4.egg/mako/runtime.py", line 798, in _render_context
          _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
        File "/usr/share/hue/build/env/lib/python2.4/site-packages/Mako-0.7.2-py2.4.egg/mako/runtime.py", line 824, in _exec_template
          callable_(context, *args, **kwargs)
        File "/tmp/tmpZtHCLZ/beeswax/my_queries.mako.py", line 201, in render_body
          __M_writer(escape(unicode(design.name)))
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 0: ordinal not in range(128)
      
      

        Attachments

        1. hue-utf-decode.png
          72 kB
          Romain Rigaux
        2. patch.diff
          3 kB
          thinker0
        3. Screen Shot 2013-09-16 at 6.16.36 PM.png
          96 kB
          thinker0
        4. Screen Shot 2013-09-16 at 6.31.01 PM.png
          75 kB
          thinker0

          Activity

            People

            • Assignee:
              thinker0 thinker0
              Reporter:
              thinker0 thinker0
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: