Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running the %%java prefixed cells in ambit #2

Open
oolonek opened this issue Mar 6, 2022 · 0 comments
Open

Issue running the %%java prefixed cells in ambit #2

oolonek opened this issue Mar 6, 2022 · 0 comments

Comments

@oolonek
Copy link

oolonek commented Mar 6, 2022

Hi,

I wanted to give a try to the https://github.com/ideaconsult/notebooks-ambit/blob/master/structure_standardization/ambit_standardize_demo.ipynb notebook.

However when I run the first cell in a notebook running on the Python kernel I get a
UsageError: Cell magic %%java not found.

I am not familiar whith running java inside Jupyter notebooks. I installed beakerx (https://github.com/twosigma/beakerx) and launched a jupyter-lab instance after selecting java11 as kernel.
The returned error is then :

py4j.Py4JException: An exception was raised by the Python Proxy. Return Message: Traceback (most recent call last):
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/py4j/clientserver.py", line 581, in _call_proxy
    return_value = getattr(self.pool[obj_id], method)(*params)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/beakerx_kernel_autotranslation/jvm_server.py", line 27, in evaluate
    self.pm.run_cell(code)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/beakerx_kernel_autotranslation/jvm_kernel_magic.py", line 44, in run_cell
    self.kc.execute(code, allow_stdin=True)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/jupyter_client/blocking/client.py", line 20, in _
    msg_id = meth(self, *args, **kwargs)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/jupyter_client/client.py", line 607, in execute
    self.shell_channel.send(msg)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/jupyter_client/channels.py", line 263, in send
    self.session.send(self.socket, msg)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/jupyter_client/session.py", line 853, in send
    stream.send_multipart(to_send, copy=copy)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/zmq/_future.py", line 248, in send_multipart
    return self._add_send_event('send_multipart', msg=msg, kwargs=kwargs)
  File "/opt/anaconda3/envs/ambit/lib/python3.7/site-packages/zmq/_future.py", line 410, in _add_send_event
    f = future or self._Future()
  File "/opt/anaconda3/envs/ambit/lib/python3.7/asyncio/events.py", line 644, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-4'.

Also I could not run the first cell using the binder instance.
I guess I am missing an obvious instruction here ...

Happy to have your help here !
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant