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

HTTP Error 400 while running Segment_GBM module on the command line #49

Open
giemmecci opened this issue Aug 19, 2019 · 10 comments
Open

Comments

@giemmecci
Copy link

Hi,
I got this error while trying to run the Segment_GBM module thru the command line:

urllib.error.HTTPError: HTTP Error 400: Bad Request

It seems to be happening after the file are loaded correctly, here's the full output:

Using TensorFlow backend.
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
File loading completed.
Traceback (most recent call last):
  File "/home/m192229/anaconda3/envs/deepneuroenv/bin/segment_gbm", line 11, in <module>
    sys.exit(main())
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/pipelines/Segment_GBM/cli.py", line 86, in main
    Segment_GBM_cli()
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/pipelines/shared.py", line 22, in __init__
    self.load()
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/pipelines/Segment_GBM/cli.py", line 16, in load
    super(Segment_GBM_cli, self).load()
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/pipelines/shared.py", line 48, in load
    getattr(self, args.command)()
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/pipelines/Segment_GBM/cli.py", line 82, in pipeline
    quiet=args.quiet)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/pipelines/Segment_GBM/predict.py", line 70, in predict_GBM
    postprocessors=[BinarizeLabel(postprocessor_string='label')])
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/models/model.py", line 284, in load_model_with_output
    model = load_old_model(load(model_name), **kwargs)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/site-packages/deepneuro/load/load.py", line 70, in load
    urlretrieve(data_dict[dataset][1], dataset_path)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 187, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 471, in open
    response = meth(req, response)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 581, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 503, in error
    result = self._call_chain(*args)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 686, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 471, in open
    response = meth(req, response)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 581, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 509, in error
    return self._call_chain(*args)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/home/m192229/anaconda3/envs/deepneuroenv/lib/python3.5/urllib/request.py", line 589, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

Thank you

@JonathanChiang
Copy link
Contributor

@giemmecci This is known issue and we are working on updating the links.

@giemmecci
Copy link
Author

Thank you

@agatadefr
Copy link

agatadefr commented Aug 28, 2019

I have the same issue. When do you expect to fix this issue ?

C:\Users\krasona\PycharmProjects\BrainLesionSegmentation>segment_gbm pipeline -T1 T1 -T1POST T1POST -FLAIR FLAIR -output_folder output -wholetumor_output wholetumor.nii.gz -en
hancing_output enhancing.nii.gz -debiased -registered -skullstripped -preprocessed
Using TensorFlow backend.
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of
 type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of
 type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of
 type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of
 type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of
 type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of
 type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a syn
onym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a syn
onym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a syn
onym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a syn
onym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a syn
onym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a syn
onym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
File loading completed.
Traceback (most recent call last):
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\Scripts\segment_gbm-script.py", line 11, in <module>
    load_entry_point('deepneuro==0.2.3', 'console_scripts', 'segment_gbm')()
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\pipelines\Segment_GBM\cli.py", line 86, in main
    Segment_GBM_cli()
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\pipelines\shared.py", line 22, in __init__
    self.load()
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\pipelines\Segment_GBM\cli.py", line 16, in load
    super(Segment_GBM_cli, self).load()
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\pipelines\shared.py", line 48, in load
    getattr(self, args.command)()
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\pipelines\Segment_GBM\cli.py", line 82, in pipeline
    quiet=args.quiet)
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\pipelines\Segment_GBM\predict.py", line 70, in predict_GBM
    postprocessors=[BinarizeLabel(postprocessor_string='label')])
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\models\model.py", line 284, in load_model_with_output
    model = load_old_model(load(model_name), **kwargs)
  File "C:\Users\krasona\PycharmProjects\BrainLesionSegmentation\venv\lib\site-packages\deepneuro\load\load.py", line 70, in load
    urlretrieve(data_dict[dataset][1], dataset_path)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 248, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 564, in error
    result = self._call_chain(*args)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 756, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 570, in error
    return self._call_chain(*args)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "C:\Users\krasona\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

@changken1
Copy link
Contributor

changken1 commented Aug 28, 2019 via email

@agatadefr
Copy link

Hmmm ... I just tried and I am getting the same error.

@changken1
Copy link
Contributor

changken1 commented Aug 28, 2019

Did you re-pull the github repository? We changed deepneuro/load/load.py

@agatadefr
Copy link

Ok. I did that. Thanks for fixing this bug.
Thanks for your help @changken1 !

@agatadefr
Copy link

One more issue could update also a link to data sample_gbm_nifti because tutorial doesn't work.
I mean exactly this one:

  'sample_gbm_nifti': [os.path.join ( current_dir, 'Sample_Data', 'TCGA_GBM_NIFTI', 'TCGA_GBM_NIFTI.zip' ),
                                  'https://www.dropbox.com/s/bqclpqzwfsreolb/GBM_NIFTI.zip?dl=1'],

@kbenahmed89
Copy link

The links are still not working. We are still getting the same issue.

@TSbme
Copy link

TSbme commented Nov 2, 2022

the link is not working.

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

6 participants