You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2016/11/14 00:08:42 UTC

zeppelin git commit: [HOTFIX][ZEPPELIN-1656] z.show in Python interpreter does not work

Repository: zeppelin
Updated Branches:
  refs/heads/master aded8681b -> f7af21e21


[HOTFIX][ZEPPELIN-1656] z.show in Python interpreter does not work

### What is this PR for?
There have been reports of #1534 causing the python interpreter to always show an error because `z` is not being set. As it turns out this is a result of improperly handling the case when matplotlib isn't found when initializing the interpreter.

### What type of PR is it?
Bug Fix

### What is the Jira issue?
[ZEPPELIN-1656](https://issues.apache.org/jira/browse/ZEPPELIN-1656)

### How should this be tested?
Run any simple python paragraph.

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Alex Goodman <ag...@users.noreply.github.com>

Closes #1628 from agoodm/patch-1 and squashes the following commits:

67f2ad5 [Alex Goodman] python interpeter should work when matplotlib is not installed
0a7a9d7 [Alex Goodman] Fix indent in bootstrap.py


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/f7af21e2
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/f7af21e2
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/f7af21e2

Branch: refs/heads/master
Commit: f7af21e2197cb4d106fdb66fde016120d4d5748d
Parents: aded868
Author: Alex Goodman <ag...@users.noreply.github.com>
Authored: Sun Nov 13 15:48:29 2016 -0800
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Mon Nov 14 01:08:36 2016 +0100

----------------------------------------------------------------------
 python/src/main/resources/bootstrap.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/f7af21e2/python/src/main/resources/bootstrap.py
----------------------------------------------------------------------
diff --git a/python/src/main/resources/bootstrap.py b/python/src/main/resources/bootstrap.py
index 6cbf6e4..0a20a34 100644
--- a/python/src/main/resources/bootstrap.py
+++ b/python/src/main/resources/bootstrap.py
@@ -207,7 +207,7 @@ class PyZeppelinContext(object):
         try:
             import matplotlib
         except ImportError:
-            pass
+            return
         # Make sure custom backends are available in the PYTHONPATH
         rootdir = os.environ.get('ZEPPELIN_HOME', os.getcwd())
         mpl_path = os.path.join(rootdir, 'interpreter', 'lib', 'python')
@@ -218,7 +218,7 @@ class PyZeppelinContext(object):
         try:
             matplotlib.use('module://backend_zinline')
             import backend_zinline
-      
+            
             # Everything looks good so make config assuming that we are using
             # an inline backend
             self._displayhook = backend_zinline.displayhook