Hi,
I’m trying to get datalad.api to work in jupyter lab. It seems to work in the terminal with ipython but not within the notebook. Here’s a link to the site with directions on how to use: http://handbook.datalad.org/en/latest/code_from_chapters/usecase_ml_code.htm
The command that gives me an error in jupyter lab is: import datalad.api as dl
This is the error I get:
/Users/eprzysinda/miniconda3/envs/test/lib/python3.7/site-packages/datalad/cmd.py:375: RuntimeWarning: coroutine ‘run_async_cmd’ was never awaited
new_loop = True
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
RuntimeError Traceback (most recent call last)
in
----> 1 import datalad.api as dl
~/miniconda3/envs/test/lib/python3.7/site-packages/datalad/init.py in
46
47 from .config import ConfigManager
—> 48 cfg = ConfigManager()
49
50 from .log import lgr
~/miniconda3/envs/test/lib/python3.7/site-packages/datalad/config.py in init(self, dataset, overrides, source)
344 self._runner = GitWitlessRunner(**run_kwargs)
345
→ 346 self.reload(force=True)
347
348 if not ConfigManager._checked_git_identity:
~/miniconda3/envs/test/lib/python3.7/site-packages/datalad/config.py in reload(self, force)
397 while to_run:
398 store_id, runargs = to_run.popitem()
→ 399 self._stores[store_id] = self._reload(runargs)
400
401 # always update the merged representation, even if we did not reload
~/miniconda3/envs/test/lib/python3.7/site-packages/datalad/config.py in _reload(self, run_args)
429 protocol=StdOutErrCapture,
430 # always expect git-config to output utf-8
→ 431 encoding=‘utf-8’,
432 )
433 store = {}
~/miniconda3/envs/test/lib/python3.7/site-packages/datalad/config.py in _run(self, args, where, reload, **kwargs)
787 if ‘-l’ in args:
788 # we are just reading, no need to reload, no need to lock
→ 789 out = self._runner.run(self._config_cmd + args, **kwargs)
790 return out[‘stdout’], out[‘stderr’]
791
~/miniconda3/envs/test/lib/python3.7/site-packages/datalad/cmd.py in run(self, cmd, protocol, stdin, cwd, env, **kwargs)
385 protocol_kwargs=kwargs,
386 cwd=cwd,
→ 387 env=env,
388 )
389 )
~/miniconda3/envs/test/lib/python3.7/asyncio/base_events.py in run_until_complete(self, future)
561 “”"
562 self._check_closed()
→ 563 self._check_runnung()
564
565 new_task = not futures.isfuture(future)
~/miniconda3/envs/test/lib/python3.7/asyncio/base_events.py in _check_runnung(self)
524 if events._get_running_loop() is not None:
525 raise RuntimeError(
→ 526 ‘Cannot run the event loop while another loop is running’)
527
528 def run_forever(self):
RuntimeError: Cannot run the event loop while another loop is running
I’m new to jupyter lab and python, so it’s possible I missed something simple when setting things up. Any help is much appreciated.
Thanks!
~Emily