Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Getting issue with TCGA  #269

@mobilist

Description

@mobilist

Hi Team,
getting issue with fetching the file from tcga repository https://portal.gdc.cancer.gov/repository?facetTab=files

inline below is the error log from jupyter notebook for your reference

Downloading file 'tcga/prostate/6b725022-f1d5-4672-8c6c-de8140345210' from 'https://api.gdc.cancer.gov/data/6b725022-f1d5-4672-8c6c-de8140345210' to '/root/.cache/histolab-images/0.2.5'.

HTTPError Traceback (most recent call last)
/usr/local/lib/python3.8/dist-packages/histolab/data/init.py in _fetch(data_filename)
189 try:
--> 190 resolved_path = image_fetcher.fetch(data_filename)
191 except HTTPError as httperror:

/usr/local/lib/python3.8/dist-packages/pooch/core.py in fetch(self, fname, processor, downloader)
538
--> 539 stream_download(
540 url,

/usr/local/lib/python3.8/dist-packages/pooch/core.py in stream_download(url, fname, known_hash, downloader, pooch, retry_if_failed)
723 with temporary_file(path=str(fname.parent)) as tmp:
--> 724 downloader(url, tmp, pooch)
725 hash_matches(tmp, known_hash, strict=True, source=str(fname.name))

/usr/local/lib/python3.8/dist-packages/pooch/downloaders.py in call(self, url, output_file, pooch)
179 response = requests.get(url, **kwargs)
--> 180 response.raise_for_status()
181 content = response.iter_content(chunk_size=self.chunk_size)

/usr/local/lib/python3.8/dist-packages/requests/models.py in raise_for_status(self)
942 if http_error_msg:
--> 943 raise HTTPError(http_error_msg, response=self)
944

HTTPError: 451 Client Error: UNAVAILABLE FOR LEGAL REASONS for url: https://api.gdc.cancer.gov/data/6b725022-f1d5-4672-8c6c-de8140345210

During handling of the above exception, another exception occurred:

HTTPError Traceback (most recent call last)
in
----> 1 prostate_svs, prostate_path = prostate_tissue()
2 ovarian_svs, ovarian_path = ovarian_tissue()

/usr/local/lib/python3.8/dist-packages/histolab/data/init.py in prostate_tissue()
476 Path where the slide is saved
477 """
--> 478 return _load_svs("tcga/prostate/6b725022-f1d5-4672-8c6c-de8140345210")

/usr/local/lib/python3.8/dist-packages/histolab/data/init.py in _load_svs(filename)
235 """
236 try:
--> 237 svs = openslide.open_slide(_fetch(filename))
238 except PIL.UnidentifiedImageError:
239 raise PIL.UnidentifiedImageError(

/usr/local/lib/python3.8/dist-packages/histolab/data/init.py in _fetch(data_filename)
190 resolved_path = image_fetcher.fetch(data_filename)
191 except HTTPError as httperror:
--> 192 raise HTTPError(f"{httperror}")
193 except ConnectionError: # pragma: no cover
194 # If we decide in the future to suppress the underlying 'requests'

HTTPError: 451 Client Error: UNAVAILABLE FOR LEGAL REASONS for url: https://api.gdc.cancer.gov/data/6b725022-f1d5-4672-8c6c-de8140345210

Is there any option to refer .svs file from local machine in current histolab implementation ?

Regards,
Amit

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions