-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c55610
commit db36ba8
Showing
3 changed files
with
64 additions
and
86 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Traceback (most recent call last): | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution | ||
executenb( | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 1204, in execute | ||
return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute() | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/util.py", line 84, in wrapped | ||
return just_run(coro(*args, **kwargs)) | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/util.py", line 62, in just_run | ||
return loop.run_until_complete(coro) | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete | ||
return future.result() | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 663, in async_execute | ||
await self.async_execute_cell( | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 965, in async_execute_cell | ||
await self._check_raise_for_error(cell, cell_index, exec_reply) | ||
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 862, in _check_raise_for_error | ||
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content) | ||
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell: | ||
------------------ | ||
# Download data and define path variables | ||
|
||
# Google Colab-Only | ||
if notebook=='colab': | ||
!datalad install https://github.com/OpenNeuroDatasets/ds004906.git | ||
os.chdir("ds004906") | ||
!datalad get . # uncomment for production | ||
# !datalad get sub-01/ # debugging | ||
# Get derivatives containing manual labels | ||
!datalad get derivatives | ||
|
||
if notebook!='colab': | ||
os.chdir("../data/rf-shimming-7t/ds004906") | ||
if notebook=='neurolibre-clean': | ||
flist = open('cleanup.txt', 'r') | ||
for f in flist: | ||
fname = f.rstrip('\n') | ||
fname = Path(os.getcwd()) / Path(fname) | ||
|
||
# or, if you get rid of os.chdir(path) above, | ||
# fname = os.path.join(path, f.rstrip()) | ||
if os.path.isfile(fname): # this makes the code more robust | ||
print('Removing file: ' + str(fname)) | ||
os.remove(fname) | ||
elif os.path.isdir(fname): | ||
print('Removing directory: ' + str(fname)) | ||
rmtree(fname) | ||
|
||
# also, don't forget to close the text file: | ||
flist.close() | ||
|
||
------------------ | ||
|
||
[0;31m---------------------------------------------------------------------------[0m | ||
[0;31mFileNotFoundError[0m Traceback (most recent call last) | ||
Cell [0;32mIn[5], line 13[0m | ||
[1;32m 10[0m get_ipython()[38;5;241m.[39msystem([38;5;124m'[39m[38;5;124mdatalad get derivatives[39m[38;5;124m'[39m) | ||
[1;32m 12[0m [38;5;28;01mif[39;00m notebook[38;5;241m!=[39m[38;5;124m'[39m[38;5;124mcolab[39m[38;5;124m'[39m: | ||
[0;32m---> 13[0m [43mos[49m[38;5;241;43m.[39;49m[43mchdir[49m[43m([49m[38;5;124;43m"[39;49m[38;5;124;43m../data/rf-shimming-7t/ds004906[39;49m[38;5;124;43m"[39;49m[43m)[49m | ||
[1;32m 14[0m [38;5;28;01mif[39;00m notebook[38;5;241m==[39m[38;5;124m'[39m[38;5;124mneurolibre-clean[39m[38;5;124m'[39m: | ||
[1;32m 15[0m flist [38;5;241m=[39m [38;5;28mopen[39m([38;5;124m'[39m[38;5;124mcleanup.txt[39m[38;5;124m'[39m, [38;5;124m'[39m[38;5;124mr[39m[38;5;124m'[39m) | ||
|
||
[0;31mFileNotFoundError[0m: [Errno 2] No such file or directory: '../data/rf-shimming-7t/ds004906' | ||
FileNotFoundError: [Errno 2] No such file or directory: '../data/rf-shimming-7t/ds004906' | ||
|