You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Bernhard Walter (JIRA)" <ji...@apache.org> on 2017/02/23 16:00:47 UTC

[jira] [Created] (ZEPPELIN-2158) PySpark: Error trace appears when assigning a value to variable "z"

Bernhard Walter created ZEPPELIN-2158:
-----------------------------------------

             Summary: PySpark: Error trace appears when assigning a value to variable "z"
                 Key: ZEPPELIN-2158
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-2158
             Project: Zeppelin
          Issue Type: Bug
          Components: front-end, GUI
    Affects Versions: 0.7.0
            Reporter: Bernhard Walter


*Issue:*

Variable "z" seems to be bound to the ZeppelinContext
Now "z" can be assigned with any value, e.g.

{code}
%pyspark
z=[]
{code}

This leads to 
{code}
	Traceback (most recent call last):
  File "/var/folders/sf/prpc_v7d1vbdjz61kshfh9x00000gp/T/zeppelin_pyspark-6677949145168225238.py", line 344, in <module>
    exec(code)
  File "<stdin>", line 3, in <module>
AttributeError: 'list' object has no attribute '_displayhook'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/var/folders/sf/prpc_v7d1vbdjz61kshfh9x00000gp/T/zeppelin_pyspark-6677949145168225238.py", line 346, in <module>
    raise Exception(traceback.format_exc())
Exception: Traceback (most recent call last):
  File "/var/folders/sf/prpc_v7d1vbdjz61kshfh9x00000gp/T/zeppelin_pyspark-6677949145168225238.py", line 344, in <module>
    exec(code)
  File "<stdin>", line 3, in <module>
AttributeError: 'list' object has no attribute '_displayhook'
{code}

in every cell that is executed later on.

Since z is a very common variable in math and statistics science, it should not be used for ZeppelinContext.
Propsal (use double underscore like in python for private stuff):
{code}
__z
{code}
or better
{code}
__zeppelinContext
{code}

*Environment:*

Downloaded http://apache.mirror.digionline.de/zeppelin/zeppelin-0.7.0/zeppelin-0.7.0-bin-netinst.tgz and installed spark, python, sh, md and angular interpreter

Started via bin/zeppelin.sh




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)