Reply
koc
New Contributor
Posts: 1
Registered: ‎07-20-2017

hue-3.9.0 cdh5.9.3 issue: global name 'SHOW_NOTEBOOKS' is not defined

[19/Jul/2017 17:46:54 +0300] access       INFO     1XX.X.2XX.1XX test.user - "GET /notebook/new HTTP/1.0"
[19/Jul/2017 17:46:54 +0300] middleware   INFO     Processing exception: global name 'SHOW_NOTEBOOKS' is not defined: Traceback (most recent call last):
  File "/usr/lib/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 "/usr/lib/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 "/usr/lib/hue/desktop/libs/notebook/src/notebook/views.py", line 117, in new
    return notebook(request)
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/decorators.py", line 54, in decorate
    return view_func(request, *args, **kwargs)
  File "/usr/lib/hue/desktop/libs/notebook/src/notebook/views.py", line 68, in notebook
    if not SHOW_NOTEBOOKS.get():
NameError: global name 'SHOW_NOTEBOOKS' is not defined

This patch fix issue:

--- /usr/lib/hue/desktop/libs/notebook/src/notebook/views.py.orig       2017-07-20 13:14:09.386874699 +0300
+++ /usr/lib/hue/desktop/libs/notebook/src/notebook/views.py    2017-07-19 19:10:09.461846849 +0300
@@ -33,6 +33,8 @@
 from metadata.conf import has_optimizer, has_navigator

 from notebook.conf import get_interpreters
+from notebook.conf import SHOW_NOTEBOOKS
 from notebook.connectors.base import Notebook, get_api
 from notebook.connectors.spark_shell import SparkApi
 from notebook.decorators import check_document_access_permission, check_document_modify_permission
Announcements