Skip to content

fails out of the box because https://file-examples.com/wp-content/storage/2017/02/file_example_CSV_5000.csv tries to verify you are human #7

@wosnat

Description

@wosnat

Hi

I am getting the error trace below. When going into the url manually I get 'verifying that you are human', which is probably the reason this script is failing.

Downloading data from 'https://file-examples.com/wp-content/storage/2017/02/file_example_CSV_5000.csv' to file '/home/osnat/github/multiomics_biocypher_kg/.cache/Example resource/file_example_CSV_5000.csv'.
Traceback (most recent call last):
File "/home/osnat/github/multiomics_biocypher_kg/create_knowledge_graph.py", line 22, in
paths = bc.download(resource) # Downloads to '.cache' by default
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/biocypher/_core.py", line 576, in download
return self._downloader.download(*resources)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/biocypher/_get.py", line 140, in download
paths.append(self._download_or_cache(resource))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/biocypher/_get.py", line 166, in _download_or_cache
paths = self._download_files(cache, resource)
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/biocypher/_get.py", line 237, in _download_files
results = self._retrieve(
url=file_download.url_s,
fname=fname,
path=os.path.join(self.cache_dir, file_download.name),
)
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/biocypher/_get.py", line 360, in _retrieve
return pooch.retrieve(
~~~~~~~~~~~~~~^
url=url,
^^^^^^^^
...<3 lines>...
progressbar=True,
^^^^^^^^^^^^^^^^^
)
^
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/pooch/core.py", line 239, in retrieve
stream_download(url, full_path, known_hash, downloader, pooch=None)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/pooch/core.py", line 807, in stream_download
downloader(url, tmp, pooch)
~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/pooch/downloaders.py", line 221, in call
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/osnat/github/multiomics_biocypher_kg/.venv/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://file-examples.com/wp-content/storage/2017/02/file_example_CSV_5000.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions