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

Can't browse server logs from the UI link cause of encoding issues

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Got the following upon an Error 500 when clicking the "Server Logs" link:

      [14/Oct/2012 14:12:36 +0000] access       WARNING  192.168.217.11 root - "GET /logs HTTP/1.0"
      [14/Oct/2012 14:12:36 +0000] middleware   INFO     Processing exception: 'utf8' codec can't decode byte 0xad in position 79: invalid start byte. You passed in '[14/Oct/2012 13:45:22 +0000] resource     DEBUG    GET Got response: PK\x03\x04\n\x00\x00\x08\x00\x00\xad\x0cN?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x04\x00ME...' (<type 'str'>): Traceback (most recent call last):
        File "/usr/share/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 "/usr/share/hue/desktop/core/src/desktop/views.py", line 54, in log_view
          return render('logs.mako', request, dict(log=[l for l in h.buf]))
        File "/usr/share/hue/desktop/core/src/desktop/lib/django_util.py", line 215, in render
          **kwargs)
        File "/usr/share/hue/desktop/core/src/desktop/lib/django_util.py", line 138, 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 115, 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 104, in render_to_string_normal
          result = template.render(**data_dict)
        File "/usr/share/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 "/usr/share/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 "/usr/share/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 "/usr/share/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/tmpL4pviB/desktop/logs.mako.py", line 66, in render_body
          __M_writer(filters.html_escape(unicode(smart_unicode(l) )))
        File "/usr/share/hue/desktop/core/src/desktop/lib/i18n.py", line 63, in smart_unicode
          s, get_site_encoding(), strings_only, errors)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/utils/encoding.py", line 39, in smart_unicode
          return force_unicode(s, encoding, strings_only, errors)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/utils/encoding.py", line 88, in force_unicode
          raise DjangoUnicodeDecodeError(s, *e.args)
      DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0xad in position 79: invalid start byte. You passed in '[14/Oct/2012 13:45:22 +0000] resource     DEBUG    GET Got response: PK\x03\x04\n\x00\x00\x08\x00\x00\xad\x0cN?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x04\x00ME...' (<type 'str'>)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abe Abraham Elmahrek
                Reporter:
                harsh Harsh J
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: