elyra-ai / examples

A repository of examples for Elyra (https://github.com/elyra-ai/elyra)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There is no current event loop in thread 'asyncio_1'

fieeman opened this issue · comments

Hello everyone, im new using elyra, when I want to run the load_data.ipynb (https://github.com/elyra-ai/examples/tree/main/pipelines/introduction-to-generic-pipelines ) example I get this error. I am running it on a TLJH (The Littlest JupyterHub) instance, I have had no problems with other extensions.

Traceback (most recent call last):
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/local/processor_local.py", line 228, in process
    papermill.execute_notebook(filepath, filepath, **additional_kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/papermill/execute.py", line 113, in execute_notebook
    nb = papermill_engines.execute_notebook_with_engine(
  File "/opt/tljh/user/lib/python3.9/site-packages/papermill/engines.py", line 49, in execute_notebook_with_engine
    return self.get_engine(engine_name).execute_notebook(nb, kernel_name, **kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/papermill/engines.py", line 367, in execute_notebook
    cls.execute_managed_notebook(nb_man, kernel_name, log_output=log_output, **kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/elyra_engine.py", line 83, in execute_managed_notebook
    return PapermillNotebookClient(nb_man, **final_kwargs).execute(**kernel_kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/papermill/clientwrap.py", line 46, in execute
    info_msg = self.wait_for_reply(self.kc.kernel_info())
  File "/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/asynchronous/client.py", line 16, in _
    msg_id = meth(self, *args, **kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/client.py", line 718, in kernel_info
    self.shell_channel.send(msg)
  File "/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/channels.py", line 263, in send
    self.session.send(self.socket, msg)
  File "/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/session.py", line 853, in send
    stream.send_multipart(to_send, copy=copy)
  File "/opt/tljh/user/lib/python3.9/site-packages/zmq/_future.py", line 199, in send_multipart
    return self._add_send_event('send_multipart', msg=msg, kwargs=kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/zmq/_future.py", line 354, in _add_send_event
    f = future or self._Future()
  File "/opt/tljh/user/lib/python3.9/asyncio/events.py", line 642, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'asyncio_1'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/local/processor_local.py", line 100, in process
    operation_processor.process(operation, elyra_run_name)
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/local/processor_local.py", line 237, in process
    self.log_and_raise(file_name, ex)
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/local/processor_local.py", line 180, in log_and_raise
    raise RuntimeError(f"({file_name}): {truncated_msg}") from ex
RuntimeError: (load_data.ipynb): There is no current event loop in thread 'asyncio_1'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/tljh/user/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/handlers.py", line 160, in post
    response = await PipelineProcessorManager.instance().process(pipeline)
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/processor.py", line 166, in process
    res = await asyncio.get_event_loop().run_in_executor(None, processor.process, pipeline)
  File "/opt/tljh/user/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/opt/tljh/user/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.result()
  File "/opt/tljh/user/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/opt/tljh/user/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/tljh/user/lib/python3.9/site-packages/elyra/pipeline/local/processor_local.py", line 108, in process
    raise RuntimeError(f"Error processing operation {operation.name} {str(ex)}") from ex
RuntimeError: Error processing operation load_data (load_data.ipynb): There is no current event loop in thread 'asyncio_1'.

What can I do to solve it?

this my environment

------- OS ----------------------
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"

------- Python Version ---------
3.9.7
------- Node JS Version --------
v14.10.0

------- Elyra Version ------------
elyra==3.14.3
elyra-code-snippet-extension==3.14.3
elyra-code-viewer-extension==3.14.3
elyra-examples-kfp-catalog==0.1.0
elyra-pipeline-editor-extension==3.14.3
elyra-python-editor-extension==3.14.3
elyra-server==3.14.3

------- Jupyter --------

jupyter-app-launcher==0.1.5
jupyter_client==7.4.9
jupyter-contrib-core==0.4.0
jupyter_core==5.1.5
jupyter-events==0.6.3
jupyter-lsp==1.5.1
jupyter-nbextensions-configurator==0.6.1
jupyter_packaging==0.12.3
jupyter-resource-usage==0.6.4
jupyter-server==1.23.5
jupyter-server-mathjax==0.2.6
jupyter-server-proxy==3.2.2
jupyter-telemetry==0.1.0
jupyterhub==1.5.1
jupyterlab==3.5.3
jupyterlab-git==0.41.0
jupyterlab-lsp==3.10.2
jupyterlab-pygments==0.2.2
jupyterlab_server==2.19.0
jupyterlab-widgets==1.1.1
nteract-on-jupyter==2.1.3



-------- Server Extensions -------
Config dir: /opt/tljh/user/etc/jupyter
    elyra enabled
    - Validating elyra...
      elyra  OK
    jupyter_lsp enabled
    - Validating jupyter_lsp...
      jupyter_lsp 1.5.1 OK
    jupyter_server_proxy enabled
    - Validating jupyter_server_proxy...
      jupyter_server_proxy  OK
    jupyter_app_launcher enabled
    - Validating jupyter_app_launcher...
      jupyter_app_launcher 0.1.5 OK
    jupyter_resource_usage enabled
    - Validating jupyter_resource_usage...
      jupyter_resource_usage 0.6.4 OK
    jupyter_server_mathjax enabled
    - Validating jupyter_server_mathjax...
      jupyter_server_mathjax  OK
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 3.5.3 OK
    jupyterlab_git enabled
    - Validating jupyterlab_git...
      jupyterlab_git 0.41.0 OK
    nbclassic enabled
    - Validating nbclassic...
      nbclassic 0.4.8 OK
    nbdime enabled
    - Validating nbdime...
      nbdime 3.1.1 OK
    nbgitpuller enabled
    - Validating nbgitpuller...
      nbgitpuller 1.1.1 OK
    notebook_shim enabled
    - Validating notebook_shim...
      notebook_shim  OK

Config dir: /usr/local/etc/jupyter

----------- Lab Extensions -----------

JupyterLab v3.5.3
/opt/tljh/user/share/jupyter/labextensions
        jupyter_app_launcher v0.1.5 enabled OK (python, jupyter_app_launcher)
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        nbdime-jupyterlab v2.1.1 enabled OK
        @jupyter-widgets/jupyterlab-manager v3.1.1 enabled OK (python, jupyterlab_widgets)
        @jupyterlab/git v0.41.0 enabled OK (python, jupyterlab-git)
        @jupyterlab/server-proxy v3.2.2 enabled OK
        @krassowski/jupyterlab-lsp v3.10.2 enabled OK (python, jupyterlab-lsp)
        @elyra/metadata-extension v3.14.3 enabled OK
        @elyra/theme-extension v3.14.3 enabled OK
        @elyra/scala-editor-extension v3.14.3 enabled OK
        @elyra/python-editor-extension v3.14.3 enabled OK
        @elyra/r-editor-extension v3.14.3 enabled OK
        @elyra/script-debugger-extension v3.14.3 enabled OK
        @elyra/pipeline-editor-extension v3.14.3 enabled OK
        @elyra/code-viewer-extension v3.14.3 enabled OK
        @elyra/code-snippet-extension v3.14.3 enabled OK
        @jupyter-server/resource-usage v0.6.4 enabled OK (python, jupyter-resource-usage)

Other labextensions (built into JupyterLab)
   app dir: /opt/tljh/user/share/jupyter/lab

Thanks for your time

I'm unable to reproduce the issue. Logs were perfectly clean and produced the following:

[I 2023-03-13 10:15:59.314 ElyraApp] local 'hello-generic-world':'Part 1 - Data Cleaning' - completed Part 1 - Data Cleaning.ipynb (25.280 secs)
[I 2023-03-13 10:15:59.314 ElyraApp] local 'hello-generic-world' - pipeline processed (27.792 secs)
FWIW, here's the `pip freeze` output...
$ pip freeze      
absl-py==1.2.0
aiofiles==22.1.0
aiosqlite==0.18.0
ansiwrap==0.8.4
anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1666191106763/work/dist
appnope==0.1.3
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work
argon2-cffi-bindings @ file:///Users/runner/miniforge3/conda-bld/argon2-cffi-bindings_1666850774529/work
arrow==1.2.3
astroid==2.11.7
asttokens==2.0.8
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1671632566681/work
autopep8==1.6.0
Babel==2.10.3
backcall==0.2.0
beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1675252249248/work
black==23.1.0
bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1674535352125/work
build==0.9.0
cachetools==4.2.4
certifi==2022.6.15
cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1671179414629/work
charset-normalizer==2.1.0
click==8.0.4
cloudpickle==2.1.0
colorama==0.4.5
contextlib2==21.6.0
debugpy==1.6.2
decorator==5.1.1
defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work
Deprecated==1.2.13
deprecation==2.1.0
dill==0.3.5.1
distlib==0.3.5
docstring-parser==0.14.1
docstring-to-markdown==0.10
docutils==0.19
elyra @ file:///Users/kbates/repos/oss/elyra-ai/elyra/dist/elyra-3.15.0.dev0-py3-none-any.whl
elyra-examples-kfp-catalog==0.1.0
entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work
env==0.1.0
exceptiongroup==1.0.4
execnet==1.9.0
executing==0.10.0
fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1663619548554/work/dist
filelock==3.8.0
fire==0.4.0
flake8==5.0.4
flake8-import-order==0.18.1
Flake8-pyproject==1.2.1
flit_core @ file:///home/conda/feedstock_root/build_artifacts/flit-core_1667734568827/work/source/flit_core
fqdn==1.5.1
git-python==1.0.3
gitdb==4.0.9
GitPython==3.1.27
google-api-core==2.8.2
google-api-python-client==1.12.11
google-auth==1.35.0
google-auth-httplib2==0.1.0
google-cloud-core==2.3.2
google-cloud-storage==1.44.0
google-crc32c==1.3.0
google-resumable-media==2.3.3
googleapis-common-protos==1.56.4
httplib2==0.20.4
Husky==0.1.7
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work
importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1672612343532/work
importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1672681417544/work
iniconfig==1.1.1
ipykernel==6.15.1
ipython==8.4.0
ipython-genutils==0.2.0
isoduration==20.11.0
isort==5.10.1
jaraco.classes==3.2.3
jedi==0.18.1
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1654302431367/work
jq==1.2.2
json5==0.9.9
jsonpointer==2.3
jsonschema==3.2.0
jupyter-events==0.6.3
jupyter-lsp==1.5.1
jupyter-packaging==0.12.2
jupyter-resource-usage==0.7.2
jupyter-server==1.23.6
jupyter-server-mathjax==0.2.6
jupyter-telemetry==0.1.0
jupyter-ydoc==0.3.4
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1675178684608/work
jupyter_core @ file:///Users/runner/miniforge3/conda-bld/jupyter_core_1675109935628/work
jupyter_server_fileid @ file:///Users/kbates/repos/oss/jupyter/jupyter_server_fileid/dist/jupyter_server_fileid-0.7.0-py3-none-any.whl
jupyter_server_terminals @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_terminals_1673491454549/work
jupyter_server_ydoc==0.7.0
jupyterlab==3.5.3
jupyterlab-git==0.41.0
jupyterlab-lsp==3.10.2
jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1649936611996/work
jupyterlab_server==2.16.6
keyring==23.13.1
kfp==1.8.13
kfp-pipeline-spec==0.1.16
kfp-server-api==1.8.4
kfp-tekton==1.6.2
kfp-tekton-server-api==1.5.0
kubernetes==18.20.0
lazy-object-proxy==1.7.1
lxml==4.9.1
markdown-it-py==2.1.0
MarkupSafe @ file:///Users/runner/miniforge3/conda-bld/markupsafe_1674135864373/work
matplotlib-inline==0.1.3
mccabe==0.7.0
mdurl==0.1.2
minio==7.1.11
mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1657892024508/work
mock==4.0.3
more-itertools==9.0.0
mypy-extensions==0.4.3
nbclassic==0.4.3
nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1669795076334/work
nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1674590374792/work
nbdime==3.1.1
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1673560067442/work
nest-asyncio==1.5.5
networkx==2.8.5
notebook==6.4.12
notebook-shim==0.1.0
numpy==1.24.2
oauthlib==3.2.0
overrides==7.0.0
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1673482170163/work
pandas==1.5.3
pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work
papermill==2.4.0
parso==0.8.3
path==16.4.0
path.py==12.5.0
pathspec==0.9.0
pep517==0.13.0
pexpect==4.8.0
pickleshare==0.7.5
pkginfo==1.9.6
pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1633981968097/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1672264874562/work
pluggy==1.0.0
prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1674535637125/work
prompt-toolkit==3.0.30
protobuf==3.20.1
psutil==5.9.1
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pure-eval==0.2.2
py==1.11.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.9.1
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work
pydantic==1.9.2
pydocstyle==6.2.3
pyflakes==2.5.0
PyGithub==1.55
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1672682006896/work
PyJWT==2.4.0
pylint==2.14.5
PyNaCl==1.5.0
pyparsing==3.0.9
pyrsistent @ file:///Users/runner/miniforge3/conda-bld/pyrsistent_1672681536809/work
pytest==7.2.0
pytest-console-scripts==1.3.1
pytest-fixture-config==1.7.0
pytest-jupyter==0.6.2
pytest-shutil==1.7.0
pytest-tornasync==0.6.0.post2
pytest-virtualenv==1.7.0
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1671655909697/work
python-lsp-jsonrpc==1.0.0
python-lsp-server==1.7.1
pytoolconfig==1.2.4
pytz==2022.2.1
PyYAML==5.4.1
pyzmq @ file:///Users/runner/miniforge3/conda-bld/pyzmq_1673612724347/work
readme-renderer==37.3
requests==2.28.1
requests-mock==1.9.3
requests-oauthlib==1.3.1
requests-toolbelt==0.9.1
requests-unixsocket==0.3.0
rfc3339-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3339-validator_1638811747357/work
rfc3986==2.0.0
rfc3986-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3986-validator_1598024191506/work
rich==13.2.0
rope==1.6.0
rsa==4.9
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.6
ruff==0.0.239
Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1628511208346/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
smmap==5.0.0
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1662051266223/work
snowballstemmer==2.2.0
soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1658207591808/work
stack-data==0.4.0
strip-hints==0.1.10
tabulate==0.8.10
tenacity==8.0.1
termcolor==1.1.0
termcolor-whl==1.1.2
terminado @ file:///Users/runner/miniforge3/conda-bld/terminado_1670254106711/work
textwrap3==0.9.2
tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1666100256010/work
tokenize-rt==5.0.0
toml==0.10.2
tomli==2.0.1
tomlkit==0.11.4
tornado @ file:///Users/runner/miniforge3/conda-bld/tornado_1666788663535/work
tqdm==4.64.0
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1675110562325/work
twine==4.0.2
typer==0.6.1
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1665144421445/work
ujson==5.4.0
uri-template==1.2.0
uritemplate==3.0.1
urllib3==1.26.11
virtualenv==20.16.3
watchdog==2.1.9
wcwidth==0.2.5
webcolors==1.12
webencodings==0.5.1
websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1674762618095/work
whatthepatch==1.0.2
wrapt==1.13.3
y-py==0.6.0
yapf==0.32.0
yaspin==2.2.0
ypy-websocket==0.8.4
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1674910338934/work

I have only modified the versions of jupyter and it works now

jupyter==1.0.0
jupyter-app-launcher==0.1.5
jupyter_client==8.0.3
jupyter-console==6.6.3
jupyter-contrib-core==0.4.0
jupyter_core==5.2.0
jupyter-events==0.6.3
jupyter-lsp==1.5.1
jupyter-nbextensions-configurator==0.6.1
jupyter_packaging==0.12.3
jupyter-resource-usage==0.7.2
jupyter-server==1.23.6
jupyter_server_fileid==0.8.0
jupyter-server-mathjax==0.2.6
jupyter-server-proxy==3.2.2
jupyter_server_terminals==0.4.4
jupyter_server_ydoc==0.6.1
jupyter-telemetry==0.1.0
jupyter-ydoc==0.2.3
jupyterhub==1.5.1
jupyterlab==3.6.1
jupyterlab-git==0.41.0
jupyterlab-lsp==3.10.2
jupyterlab-pygments==0.2.2
jupyterlab_server==2.20.0
jupyterlab-widgets==3.0.5
nteract-on-jupyter==2.1.3