-
Notifications
You must be signed in to change notification settings - Fork 532
Issues of interfacing with PETPVC modules #2068
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
Comments
I don't see a problem with your environment. I wonder if you're not
escaping the back slashes in the file paths.
…On Jun 6, 2017 11:54, "ubersexualShupeng" ***@***.***> wrote:
Hi @effigies <https://github.com/effigies> @alexsavio
<https://github.com/alexsavio>, I have run it in a Node and the content
of the file report.rst as following:
Node: petpvc
Hierarchy : pvc
Exec ID : pvc
Original Inputs
- alpha :
- args :
- debug : False
- environ : {}
- fwhm_x : 2.0
- fwhm_y : 2.0
- fwhm_z : 2.0
- ignore_exception : False
- in_file : C:\Users\135173\Desktop\pvc_test\PET_nii\x_WB_CTAC_Body.
nii.gz
- mask_file : C:\Users\135173\Desktop\pvc_test\mask_nill\skin_mask.nii.
gz
- n_deconv :
- n_iter :
- out_file : C:\Users\135173\Desktop\pvc_test\pet_pvc_rbv.nii.gz
- pvc : RBV
- stop_crit :
- terminal_output : stream
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2068>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFF8k0GOZhFXLcECocy2KO5litwNfSmks5sBXY-gaJpZM4NxjRB>
.
|
I have tried to replace the back slashes to 'double back slashes' '\' or forward dash '/' but the same error still appeared. Is there are any other possible problems? The error messages as following: Thanks. |
I believe nipype will pass your actual environment through. Can you check import os
print(os.environ) for non-string keys/values? (This may contain some personal information. If you're going to post the results of this for inspection, consider censoring it.) |
@ubersexualShupeng are you still running into this issue? |
Yes. I do not use this py module anymore. I use the PETPVC (binary) directly now. |
To be clear, are you able to run other external programs, such as FSL or FreeSurfer, through nipype, or is this To get the context in this issue, the code run was: import nipype
import nipype.interfaces.petpvc as PETPVC
pvc = PETPVC.PETPVC()
pvc.inputs.in_file = 'C:\Users\135173\Desktop\pvc_test\PET_nii\x_WB_CTAC_Body.nii.gz'
pvc.inputs.mask_file = 'C:\Users\135173\Desktop\pvc_test\mask_nill\skin_mask.nii.gz'
pvc.inputs.out_file = 'C:\Users\135173\Desktop\pvc_test\pet_pvc_rbv.nii.gz'
pvc.inputs.pvc = 'RBV'
pvc.inputs.fwhm_x = 2
pvc.inputs.fwhm_y = 2
pvc.inputs.fwhm_z = 2
outs = pvc.run() With error: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Anaconda2\lib\site-packages\nipype\interfaces\base.py", line 1081, in run
runtime = self._run_wrapper(runtime)
File "C:\Program Files\Anaconda2\lib\site-packages\nipype\interfaces\base.py", line 1724, in _run_wrapper
runtime = self._run_interface(runtime)
File "C:\Program Files\Anaconda2\lib\site-packages\nipype\interfaces\base.py", line 1755, in _run_interface
redirect_x=self._redirect_x)
File "C:\Program Files\Anaconda2\lib\site-packages\nipype\interfaces\base.py", line 1457, in run_command
env=runtime.environ)
File "C:\Program Files\Anaconda2\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Program Files\Anaconda2\lib\subprocess.py", line 640, in _execute_child
startupinfo)
TypeError: environment can only contain strings
Interface PETPVC failed to run. This may be a Unicode-on-Windows issue (see https://stackoverflow.com/questions/12253014/why-does-popen-fail-on-windows-if-the-env-parameter-contains-a-unicode-object). I can see if I can make a patch that filters the environment for unicode strings and replaces them with |
Hi @ubersexualShupeng. Can you give #2085 a shot? pip install --upgrade "git+https://github.com/effigies/nipype.git@fix/windows_env#egg=nipype" |
Hi @effigies @alexsavio, I have run it in a Node and the content of the file report.rst as following:
Node: petpvc
Hierarchy : pvc
Exec ID : pvc
Original Inputs
Thanks.
The text was updated successfully, but these errors were encountered: