berkeley-stat159 / project-kappa

BSD 3-Clause "New" or "Revised" License
0 stars 7 forks source link

make all doesn't work #136

Closed rossbar closed 8 years ago

rossbar commented 8 years ago

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):

kappa_error

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.

rossbar commented 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)

imranyousuf commented 8 years ago

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

imranyousuf commented 8 years ago

Opps, sorry did not see your comment

rossbar commented 8 years ago

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

imranyousuf commented 8 years ago

Ok I will download virtual box and try to run the steps.

imranyousuf commented 8 years ago

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

rossbar commented 8 years ago

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
imranyousuf commented 8 years ago

@changzheng1993: your Analysis.py is not working @noelpimentel: your eda.py is not working.

Can you check and let ross know asap. Thanks!

imranyousuf commented 8 years ago

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.

imranyousuf commented 8 years ago

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.

screen shot 2015-12-16 at 5 46 57 pm
rossbar commented 8 years ago

The ds105 directory doesn't get installed on my system when I make data

imranyousuf commented 8 years ago

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 :)

rossbar commented 8 years ago

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.

imranyousuf commented 8 years ago

Thank you @rossbar, much appreciated :+1:

rossbar commented 8 years ago

The analysis has completed successfully, thanks for taking the time to look at this!