Uploaded image for project: 'Hue'
  1. Hue
  2. HUE-1907

[impala] Date result fields are not jsonifiable

    Details

      Description

      select count(*) FROM alltypes
      
       Unmanageable server error occured: TypeError at /impala/execute/design/207 datetime.datetime(2014, 1, 24, 17, 9, 48, 898987) is not JSON serializable Request Method: GET Request URL: http://127.0.0.1:8000/impala/execute/design/207 Django Version: 1.4.5 Python Executable: /home/romain/projects/hue/build/env/bin/python2.7 Python Version: 2.7.3 Python Path: ['/home/romain/projects/hue/build/env/bin', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/pip-1.1-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/avro-1.5.0-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Babel-0.9.6-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/BabelDjango-0.2.2-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/configobj-4.6.0-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/django_auth_ldap-1.0.7-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/django_extensions-0.5-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/django_nose-1.2-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/django_openid_auth-0.5-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/elementtree-1.2.6_20050316-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/enum-0.4.4-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/kerberos-1.1.1-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/lockfile-0.8-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/lxml-2.2.2-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Markdown-2.0.3-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/MarkupSafe-0.9.3-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.3c1-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/pam-0.1.3-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Paste-1.7.2-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Pygments-1.3.1-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/pyOpenSSL-0.13-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/pysqlite-2.5.5-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/python_daemon-1.5.1-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/python_ldap-2.3.13-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/oauth2-1.5.211-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/python_openid-2.2.5-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/pytidylib-0.2.1-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/PyYAML-3.09-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/requests_kerberos-0.3-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/sasl-0.1.1-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/simplejson-2.0.9-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/South-0.8.2-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/threadframe-0.2-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/thrift-0.9.1-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/urllib2_kerberos-0.1.6-py2.7.egg', '/home/romain/projects/hue/desktop/core/src', '/home/romain/projects/hue/desktop/libs/hadoop/src', '/home/romain/projects/hue/desktop/libs/liboozie/src', '/home/romain/projects/hue/desktop/libs/libsaml/src', '/home/romain/projects/hue/desktop/libs/librdbms/src', '/home/romain/projects/hue/desktop/libs/libopenid/src', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/ipdb-0.1dev_r1716-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/ipython-0.10-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/nose-0.11.3-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/coverage-3.2-py2.7-linux-x86_64.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/nosetty-0.4-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Werkzeug-0.6-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/windmill-1.3-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages/pytz-2013.9-py2.7.egg', '/home/romain/projects/hue/build/env/lib/python2.7', '/home/romain/projects/hue/build/env/lib/python2.7/plat-linux2', '/home/romain/projects/hue/build/env/lib/python2.7/lib-tk', '/home/romain/projects/hue/build/env/lib/python2.7/lib-old', '/home/romain/projects/hue/build/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/home/romain/projects/hue/build/env/lib/python2.7/site-packages', '/home/romain/projects/hue/apps/about/src', '/home/romain/projects/hue/apps/beeswax/src', '/home/romain/projects/hue/apps/filebrowser/src', '/home/romain/projects/hue/apps/hbase/src', '/home/romain/projects/hue/apps/help/src', '/home/romain/projects/hue/apps/impala/src', '/home/romain/projects/hue/apps/jobbrowser/src', '/home/romain/projects/hue/apps/jobsub/src', '/home/romain/projects/hue/apps/metastore/src', '/home/romain/projects/hue/apps/oozie/src', '/home/romain/projects/hue/apps/pig/src', '/home/romain/projects/hue/apps/proxy/src', '/home/romain/projects/hue/apps/rdbms/src', '/home/romain/projects/hue/apps/search/src', '/home/romain/projects/hue/apps/spark/src', '/home/romain/projects/hue/apps/sqoop/src', '/home/romain/projects/hue/apps/useradmin/src', '/home/romain/projects/hue/apps/zookeeper/src', '/home/romain/projects/hue/apps/beeswax/src/beeswax/../../gen-py', '/home/romain/projects/hue/apps/jobbrowser/src/jobbrowser/../../gen-py', '/home/romain/projects/hue/apps/proxy/src/proxy/../../gen-py'] Server time: Fri, 24 Jan 2014 17:18:08 -0800 Installed Applications: ['django.contrib.auth', 'django_openid_auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django_extensions', 'south', 'babeldjango', 'desktop', 'about', 'beeswax', 'filebrowser', 'hbase', 'help', 'impala', 'jobbrowser', 'jobsub', 'metastore', 'oozie', 'pig', 'proxy', 'rdbms', 'search', 'spark', 'sqoop', 'useradmin', 'zookeeper'] Installed Middleware: ['desktop.middleware.EnsureSafeMethodMiddleware', 'desktop.middleware.DatabaseLoggingMiddleware', 'django.middleware.common.CommonMiddleware', 'desktop.middleware.SessionOverPostMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'desktop.middleware.SpnegoMiddleware', 'desktop.middleware.HueRemoteUserMiddleware', 'django.middleware.locale.LocaleMiddleware', 'babeldjango.middleware.LocaleMiddleware', 'desktop.middleware.AjaxMiddleware', 'desktop.middleware.LoginAndPermissionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'desktop.middleware.NotificationMiddleware', 'desktop.middleware.JFrameMiddleware', 'desktop.middleware.ExceptionMiddleware', 'desktop.middleware.ClusterMiddleware', 'desktop.middleware.AppSpecificMiddleware', 'django.middleware.transaction.TransactionMiddleware'] Traceback: File "/home/romain/projects/hue/build/env/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/home/romain/projects/hue/apps/beeswax/src/beeswax/views.py" in execute_query 375. return render('execute.mako', request, context) File "/home/romain/projects/hue/desktop/core/src/desktop/lib/django_util.py" in render 216. return render_json(data, request.GET.get("callback"), status=status) File "/home/romain/projects/hue/desktop/core/src/desktop/lib/django_util.py" in render_json 290. json = encode_json(data, indent) File "/home/romain/projects/hue/desktop/core/src/desktop/lib/django_util.py" in encode_json 262. return simplejson.dumps(data, indent=indent, cls=Encoder) File "/home/romain/projects/hue/build/env/lib/python2.7/site-packages/simplejson-2.0.9-py2.7-linux-x86_64.egg/simplejson/__init__.py" in dumps 237. **kw).encode(obj) File "/home/romain/projects/hue/build/env/lib/python2.7/site-packages/simplejson-2.0.9-py2.7-linux-x86_64.egg/simplejson/encoder.py" in encode 200. chunks = self.iterencode(o, _one_shot=True) File "/home/romain/projects/hue/build/env/lib/python2.7/site-packages/simplejson-2.0.9-py2.7-linux-x86_64.egg/simplejson/encoder.py" in iterencode 260. return _iterencode(o, 0) File "/home/romain/projects/hue/desktop/core/src/desktop/lib/django_util.py" in default 72. return simplejson.JSONEncoder.default(self, o) File "/home/romain/projects/hue/build/env/lib/python2.7/site-packages/simplejson-2.0.9-py2.7-linux-x86_64.egg/simplejson/encoder.py" in default 177. raise TypeError(repr(o) + " is not JSON serializable") Exception Type: TypeError at /impala/execute/design/207 Exception Value: datetime.datetime(2014, 1, 24, 17, 9, 48, 898987) is not JSON serializable 
      

        Attachments

          Activity

            People

            • Assignee:
              romain Romain Rigaux
              Reporter:
              romain Romain Rigaux
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: