Closed rossbar closed 8 years ago
The error looks like you're calling tar
with the -z
option on a file that is not zipped. The -z
option with tar should only be used when the file has been compressed with gzip (these files usually end with .tgz
or .gz
)
Hi Ross, I looks like the error is due to the option z. For some reason it works in mac. I have removed the option z in data/downloader.sh. Hope that fixes the problem.
http://stackoverflow.com/questions/15744023/how-to-extract-filename-tar-gz-file
Opps, sorry did not see your comment
I recommend running a complete build of your project from scratch (i.e. clone the project to a new directory and go through all the steps laid out in your readme) to verify that the rest of the build works. It would be best if you could do this on a linux machine to avoid any other mac issues that might crop up
Ok I will download virtual box and try to run the steps.
Hi Ross, I tried in a linux box and fixed some minor issues. Please let me know if something does not work. The python files took a long time to run. It might say that it is not responding but after a while (45ish-2hr ish) it generates the images
Still no luck, I get the following error from make eda
:
cd code/utils && python eda.py
Traceback (most recent call last):
File "eda.py", line 25, in <module>
data = bold_data(subject, 1)
File "/media/ross/DATAPART1/stats159/projects/project-kappa/code/utils/loading_data.py", line 77, in bold_data
img= nib.load(direct_path)
File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 44, in load
return guessed_image_type(filename).from_filename(filename, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 76, in guessed_image_type
with BinOpener(filename) as fobj:
File "/usr/local/lib/python2.7/dist-packages/nibabel/openers.py", line 120, in __init__
self.fobj = opener(fileish, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nibabel/openers.py", line 63, in _gzip_open
gzip_file = BufferedGzipFile(fileish, *args, **kwargs)
File "/usr/lib/python2.7/gzip.py", line 94, in __init__
fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/media/ross/DATAPART1/stats159/projects/project-kappa/data/ds105/sub001/model/model001/task001_run001.feat/filtered_func_data_mni.nii.gz'
make: *** [eda] Error 1
And the following error from make analysis
:
cd code/utils && python Analysis.py
Traceback (most recent call last):
File "Analysis.py", line 8, in <module>
Betas_vol = {'Beta_vols'+str(x): design_matrix('sub001', x, TR = 2.5)[2] for x in range(1,13)}
File "Analysis.py", line 8, in <dictcomp>
Betas_vol = {'Beta_vols'+str(x): design_matrix('sub001', x, TR = 2.5)[2] for x in range(1,13)}
File "/media/ross/DATAPART1/stats159/projects/project-kappa/code/utils/design_matrix.py", line 19, in design_matrix
data = bold_data(subject,run)
File "/media/ross/DATAPART1/stats159/projects/project-kappa/code/utils/loading_data.py", line 77, in bold_data
img= nib.load(direct_path)
File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 44, in load
return guessed_image_type(filename).from_filename(filename, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 76, in guessed_image_type
with BinOpener(filename) as fobj:
File "/usr/local/lib/python2.7/dist-packages/nibabel/openers.py", line 120, in __init__
self.fobj = opener(fileish, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nibabel/openers.py", line 63, in _gzip_open
gzip_file = BufferedGzipFile(fileish, *args, **kwargs)
File "/usr/lib/python2.7/gzip.py", line 94, in __init__
fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/media/ross/DATAPART1/stats159/projects/project-kappa/data/ds105/sub001/model/model001/task001_run001.feat/filtered_func_data_mni.nii.gz'
make: *** [analysis] Error 1
@changzheng1993: your Analysis.py is not working @noelpimentel: your eda.py is not working.
Can you check and let ross know asap. Thanks!
Hi @rossbar, I just re ran it and it looks like it works for me. The error states that: [Errno 2] No such file or directory: '/media/ross/DATAPART1/stats159/projects/project-kappa/data/ds105/sub001/model/model001/task001_run001.feat/filtered_func_data_mni.nii.gz'
Could you please manually check if the path exists. I have a feeling the tar was not extracted properly. It happened to me once. My guess is that it tried to download the zip again and linux puts a .1 at the end for duplicates and the tar was never extracted. If possible can you delete ds105 folder and the zip associated with it and extract it again.
Tried it on my mac as well and seems to work. Also shows the directory exsists. I did a make all and then tried make eda.
The ds105 directory doesn't get installed on my system when I make data
Hi @rossbar , Thanks for letting me know. Make data just calls : https://github.com/berkeley-stat159/project-kappa/blob/master/data/downloader.sh which should create the ds105 directory.
Can you please delete the entire project-kappa folder and pull it from git again and run make all in the root directory. I dont know why ds105 is not installed in your system. ds105 should be the extraction from ds105_mnifunc.tar. Thanks again.
Please let me know if that worked :)
A fresh clone seems to have worked. I pulled your changes before, but maybe I didn't clean out the data folder and that caused problems. Whatever the case, it appears the build associated with commit a6df945 is fine. Thanks for taking a look and responding so quickly. I will close the issue when the analysis completes successfully.
Thank you @rossbar, much appreciated :+1:
The analysis has completed successfully, thanks for taking the time to look at this!
I get the following error when running
make all
(I'm working remotely, so I had to use a screen grab, sorry for the poor quality):Please push fixes as soon as possible. If you don't plan on fixing this, apply the wontfix label to this issue and we will try to proceed manually.