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

Invalid first line for key/value file #42

Open
ctlin001 opened this issue Jan 24, 2022 · 2 comments
Open

Invalid first line for key/value file #42

ctlin001 opened this issue Jan 24, 2022 · 2 comments

Comments

@ctlin001
Copy link

ctlin001 commented Jan 24, 2022

I was using pipetography.connectome that crashed on the SIFT2 node. The followings are the error message.

SLURM log file:

```220124-01:02:20,949` nipype.workflow INFO:
[Node] Finished "LinearRegistration", elapsed time 2063.624523s.
220124-01:17:09,232 nipype.workflow INFO:
[Node] Finished "NonLinearRegistration", elapsed time 1052.248168s.
Traceback (most recent call last):
File "/test_BIDS_dwi2run/code/pipetography/postprocess_bids.py", line 21, in
main()
File "/test_BIDS_dwi2run/code/pipetography/postprocess_bids.py", line 18, in main
connectomes.run_pipeline(parallel=4)
File "/opt/pipetography/pipetography/connectomes.py", line 128, in run_pipeline
self.workflow.run('MultiProc', plugin_args = {'n_procs': parallel})
File "/opt/nipype/nipype/pipeline/engine/workflows.py", line 638, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/opt/nipype/nipype/pipeline/plugins/base.py", line 166, in run
self._clean_queue(jobid, graph, result=result)
File "/opt/nipype/nipype/pipeline/plugins/base.py", line 244, in _clean_queue
raise RuntimeError("".join(result["traceback"]))
RuntimeError: Traceback (most recent call last):
File "/opt/nipype/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/opt/nipype/nipype/pipeline/engine/nodes.py", line 524, in run
result = self._run_interface(execute=True)
File "/opt/nipype/nipype/pipeline/engine/nodes.py", line 642, in _run_interface
return self._run_command(execute)
File "/opt/nipype/nipype/pipeline/engine/nodes.py", line 751, in _run_command
f"Exception raised while executing Node {self.name}.\n\n{result.runtime.traceback}"
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node SIFT2.

RuntimeError: subprocess exited with code 1.```

And the crash file message:

`Node inputs:
act =
args =
environ = {}
fd_scale_gm =
force =
in_file =
in_fod =
nthreads =
out_file = sift2.txt
proc_mask =
Traceback:
Traceback (most recent call last):
File "/opt/nipype/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/opt/nipype/nipype/pipeline/engine/nodes.py", line 524, in run
result = self._run_interface(execute=True)
File "/opt/nipype/nipype/pipeline/engine/nodes.py", line 642, in _run_interface
return self._run_command(execute)
File "/opt/nipype/nipype/pipeline/engine/nodes.py", line 751, in _run_command
f"Exception raised while executing Node {self.name}.\n\n{result.runtime.traceback}"
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node SIFT2.

RuntimeError: subprocess exited with code 1.`

Then I pasted the comman.txt in the SIFT2 working directory and ran the command script, the following error occurred:

Singularity> tcksift2 /test_BIDS_dwi2run/derivatives/streamlines/sub-UCSF002/ses-01/sub-UCSF002_ses-01_gmwmi2wm.tck /test_BIDS_dwi2run/code/pipetography/workingdir/connectomes/_session_id_01_subject_id_UCSF002/dwiFOD/wm.mif sift2.txt tcksift2: [100%] Creating homogeneous processing mask tcksift2: [100%] segmenting FODs tcksift2: [ERROR] invalid first line for key/value file "/test_BIDS_dwi2run/derivatives/streamlines/sub-UCSF002/ses-01/sub-UCSF002_ses-01_gmwmi2wm.tck" (expected "mrtrix tracks")

The file sub-UCSF002_ses-01_gmwmi2wm.tck exists, but somehow it showed this message.
Note that this same error occurred across different datasets.

@axiezai
Copy link
Owner

axiezai commented Jan 24, 2022

This looks like 2 different things are happening when you do it as part of the workflow or execute the command by itself.

In the workflow, updatehash is trying to determine if the Node inputs have changed and whether the node needs to be re-executed, meaning there's something with your intermediate files causing an error at this step that's out of my control.

In the standalone, @benjaminsipes isn't this the same tck conversion problem you told me about? It's inconsistent?

@benjaminsipes
Copy link
Collaborator

Yes, this is the same problem as far as I can tell, but this is the first time I've seen it replicated while rerunning the same data.

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

3 participants