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

404: Not Found when loading Stanford labels #764

Closed
stephanmeesters opened this Issue Nov 6, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@stephanmeesters
Contributor

stephanmeesters commented Nov 6, 2015

There appears to be a broken link when trying to load the Stanford atlas labels, which is breaking one or more demo's (tracking_tissue_classifier.py):

from dipy.data import read_stanford_labels
read_stanford_labels()

Output:

Traceback (most recent call last):
  File "doc/examples/tracking_tissue_classifier.py", line 39, in <module>
    hardi_img, gtab, labels_img = read_stanford_labels()
  File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 426, in read_stanford_labels
    files, folder = fetch_stanford_labels()
  File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 176, in fetcher
    fetch_data(files, folder, data_size)
  File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 125, in fetch_data
    _get_file_data(fullpath, url)
  File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 83, in _get_file_data
    with contextlib.closing(urlopen(url)) as opener:
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
@arokem

This comment has been minimized.

Member

arokem commented Nov 6, 2015

Yep - I also noticed that yesterday.

I know exactly what it is: It's in the file name for the text file for the
labels. Will push a fix ASAP.

On Fri, Nov 6, 2015 at 8:07 AM, stephanmeesters notifications@github.com
wrote:

There appears to be a broken link when trying to load the Stanford atlas
labels, which is breaking one or more demo's
(tracking_tissue_classifier.py):

from dipy.data import read_stanford_labels
read_stanford_labels()

Output:

Traceback (most recent call last):
File "doc/examples/tracking_tissue_classifier.py", line 39, in
hardi_img, gtab, labels_img = read_stanford_labels()
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 426, in read_stanford_labels
files, folder = fetch_stanford_labels()
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 176, in fetcher
fetch_data(files, folder, data_size)
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 125, in fetch_data
_get_file_data(fullpath, url)
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 83, in _get_file_data
with contextlib.closing(urlopen(url)) as opener:
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(_args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found


Reply to this email directly or view it on GitHub
#764.

@arokem

This comment has been minimized.

Member

arokem commented Nov 6, 2015

We also need to think about testing of these fetchers...

On Fri, Nov 6, 2015 at 8:09 AM, Ariel Rokem arokem@gmail.com wrote:

Yep - I also noticed that yesterday.

I know exactly what it is: It's in the file name for the text file for the
labels. Will push a fix ASAP.

On Fri, Nov 6, 2015 at 8:07 AM, stephanmeesters notifications@github.com
wrote:

There appears to be a broken link when trying to load the Stanford atlas
labels, which is breaking one or more demo's
(tracking_tissue_classifier.py):

from dipy.data import read_stanford_labels
read_stanford_labels()

Output:

Traceback (most recent call last):
File "doc/examples/tracking_tissue_classifier.py", line 39, in
hardi_img, gtab, labels_img = read_stanford_labels()
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 426, in read_stanford_labels
files, folder = fetch_stanford_labels()
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 176, in fetcher
fetch_data(files, folder, data_size)
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 125, in fetch_data
_get_file_data(fullpath, url)
File "/Users/stephan/Research/Projects/SP/dipy/dipy/data/fetcher.py", line 83, in _get_file_data
with contextlib.closing(urlopen(url)) as opener:
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(_args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found


Reply to this email directly or view it on GitHub
#764.

@arokem

This comment has been minimized.

Member

arokem commented Nov 6, 2015

Closed through #765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment