Lakhvir Singh Sohal created ZEPPELIN-5482:
---------------------------------------------

             Summary:  Run paragraph from another using z.run() throws a null 
pointer exception
                 Key: ZEPPELIN-5482
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-5482
             Project: Zeppelin
          Issue Type: Bug
          Components: zeppelin-client, zeppelin-interpreter, zeppelin-server, 
zeppelin-web, zeppelin-zengine
    Affects Versions: 0.9.0
         Environment: * Windows 10 64 bit.
 * Zeppelin version 0.9.0
 * Python 3.6.7
 * Java jdk 11.0.1
            Reporter: Lakhvir Singh Sohal


I am having a few issues with Apache Zeppelin, specifically how to invoke a 
paragraph from another. I am using Zeppelin Version 0.9.0 with the Python 
interpreter.

The aim of what I am trying to achieve is to have some paragraph with a drop 
down of dates, and when the user selects a date, I want to run some other 
paragraphs. This is so that the user does not need to select a date in every 
single paragraph. With the date, I will locate some files and present them in 
tables/charts.

Looking at the documentation, it suggests we can use z.run() with the given 
note id and paragraph id. Unfortunately when I do this, I keep getting an error.

Here is a minimum example of what I am trying:
{code:java}
# Cell 1 - Create select box, allow user selection, then trigger Cell 2 
user_choice = z.select("f2", [("o1","1"), ("o2","2")], "o1") z.run('2GBQ57B2K', 
'paragraph_1627463517803_1716289354')
{code}
 
{code:java}
# Cell 2 - Triggered as user made a choice in Cell 1.
print(user_choice)
print('lemon'){code}
This results in an error in Cell 1. Please see the log below:

 
{code:java}
Py4JJavaError: An error occurred while calling o1.run.
: java.lang.NullPointerException
    at 
org.apache.zeppelin.interpreter.ZeppelinContext.run(ZeppelinContext.java:497)
    at 
org.apache.zeppelin.interpreter.ZeppelinContext.run(ZeppelinContext.java:475)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
    at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
    at py4j.Gateway.invoke(Gateway.java:282)
    at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)
    at py4j.GatewayConnection.run(GatewayConnection.java:238)
    at java.lang.Thread.run(Thread.java:745)

(<class 'py4j.protocol.Py4JJavaError'>, Py4JJavaError('An error occurred while 
calling o1.run.\n', JavaObject id=o24), <traceback object at 0x7facaea7d7c8>)

{code}
 

Has anyone encountered this before? Or any thoughts on what could be going 
wrong? I have not been able to find anything online. For what it's worth, 
z.runNote() works but it runs everything. I hope to only run a subset of 
paragraphs ids.

Many thanks

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to