Skip to content

[BUG]: maybe the h5ad is invalid, need to check it and replace it #33

@johnnynv

Description

@johnnynv

Version

main

Which installation method(s) does this occur on?

No response

Describe the bug.

url = "https://exampledata.scverse.org/rapids-singlecell/dli_census.h5ad"
wget.download(url, output)

Got HTTP 403 Forbidden

Minimum reproducible example

Relevant log output

cuml 25.6.0 requires nvidia-curand, which is not installed.
cuml 25.6.0 requires nvidia-cusolver, which is not installed.
cuml 25.6.0 requires nvidia-cusparse, which is not installed.
cuxfilter 25.6.0 requires cupy-cuda11x>=12.0.0, which is not installed.
nx-cugraph 25.6.0 requires cupy-cuda11x>=12.0.0, which is not installed.
cucim 25.6.0 requires cupy-cuda11x>=12.0.0, which is not installed.
cuxfilter 25.6.0 requires bokeh<=3.6.3,>=3.1, but you have bokeh 3.7.3 which is incompatible.
cuxfilter 25.6.0 requires shapely<2.1.0, but you have shapely 2.1.1 which is incompatible.
Successfully installed anndata-0.11.4 array-api-compat-1.12.0 asciitree-0.3.3 deprecated-1.2.18 fasteners-0.20 fonttools-4.61.1 h5py-3.13.0 legacy-api-wrap-1.4.1 natsort-8.4.0 networkx-3.4.2 numcodecs-0.15.1 pynndescent-0.5.13 rapids-singlecell-0.12.6 scanpy-1.11.1 scikit-image-0.25.2 scikit-learn-1.5.2 scikit-misc-0.5.1 scipy-1.15.3 session-info2-0.1.2 tifffile-2025.5.10 umap-learn-0.5.7 wget-3.2 wrapt-1.17.2 zarr-2.18.7
Input Notebook:  notebooks/03_scRNA_analysis_with_pearson_residuals.ipynb
Output Notebook: notebook_output/result_03_scRNA_analysis_with_pearson_residuals.ipynb

Executing:   0%|          | 0/52 [00:00<?, ?cell/s]Executing notebook with kernel: python3
Executing Cell 1---------------------------------------
Ending Cell 1------------------------------------------

Executing:   2%|| 1/52 [00:01<00:58,  1.14s/cell]Executing Cell 2---------------------------------------
Ending Cell 2------------------------------------------

Executing:   4%|| 2/52 [00:06<02:55,  3.52s/cell]Executing Cell 3---------------------------------------
Ending Cell 3------------------------------------------

Executing:   6%|| 3/52 [00:06<01:39,  2.03s/cell]Executing Cell 4---------------------------------------
Ending Cell 4------------------------------------------
Executing Cell 5---------------------------------------
Ending Cell 5------------------------------------------
Executing Cell 6---------------------------------------
creating data directory
Downloading cell data..

Ending Cell 6------------------------------------------

Executing:  12%|█▏        | 6/52 [00:07<00:39,  1.17cell/s]
Executing:  12%|█▏        | 6/52 [00:08<01:06,  1.44s/cell]
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/conda/lib/python3.12/site-packages/papermill/__main__.py", line 4, in <module>
    papermill()
  File "/opt/conda/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/papermill/cli.py", line 235, in papermill
    execute_notebook(
  File "/opt/conda/lib/python3.12/site-packages/papermill/execute.py", line 131, in execute_notebook
    raise_for_execution_errors(nb, output_path)
  File "/opt/conda/lib/python3.12/site-packages/papermill/execute.py", line 251, in raise_for_execution_errors
    raise error
papermill.exceptions.PapermillExecutionError: 
---------------------------------------------------------------------------
Exception encountered at "In [3]":
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
Cell In[3], line 18
     16 if not os.path.isfile(output): # as it's not there, let's see if we have our downloaded file.  If not, let's get it!
     17     print('Downloading cell data..')
---> 18     wget.download(url, output)
     20 adata = ad.read_h5ad(output)
     21 adata= adata[adata.obs["assay"].isin(["10x 3' v3", "10x 5' v1", "10x 5' v2"])].copy()

File /opt/conda/lib/python3.12/site-packages/wget.py:526, in download(url, out, bar)
    524 else:
    525     binurl = url
--> 526 (tmpfile, headers) = ulib.urlretrieve(binurl, tmpfile, callback)
    527 filename = detect_filename(url, out, headers)
    528 if outdir:

File /opt/conda/lib/python3.12/urllib/request.py:240, in urlretrieve(url, filename, reporthook, data)
    223 """
    224 Retrieve a URL into a temporary location on disk.
    225 
   (...)    236 data file as well as the resulting HTTPMessage object.
    237 """
    238 url_type, path = _splittype(url)
--> 240 with contextlib.closing(urlopen(url, data)) as fp:
    241     headers = fp.info()
    243     # Just return the local path and the "headers" for file://
    244     # URLs. No sense in performing a copy unless requested.

File /opt/conda/lib/python3.12/urllib/request.py:215, in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    213 else:
    214     opener = _opener
--> 215 return opener.open(url, data, timeout)

File /opt/conda/lib/python3.12/urllib/request.py:521, in OpenerDirector.open(self, fullurl, data, timeout)
    519 for processor in self.process_response.get(protocol, []):
    520     meth = getattr(processor, meth_name)
--> 521     response = meth(req, response)
    523 return response

File /opt/conda/lib/python3.12/urllib/request.py:630, in HTTPErrorProcessor.http_response(self, request, response)
    627 # According to RFC 2616, "2xx" code indicates that the client's
    628 # request was successfully received, understood, and accepted.
    629 if not (200 <= code < 300):
--> 630     response = self.parent.error(
    631         'http', request, response, code, msg, hdrs)
    633 return response

File /opt/conda/lib/python3.12/urllib/request.py:559, in OpenerDirector.error(self, proto, *args)
    557 if http_err:
    558     args = (dict, 'default', 'http_error_default') + orig_args
--> 559     return self._call_chain(*args)

File /opt/conda/lib/python3.12/urllib/request.py:492, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
    490 for handler in handlers:
    491     func = getattr(handler, meth_name)
--> 492     result = func(*args)
    493     if result is not None:
    494         return result

File /opt/conda/lib/python3.12/urllib/request.py:639, in HTTPDefaultErrorHandler.http_error_default(self, req, fp, code, msg, hdrs)
    638 def http_error_default(self, req, fp, code, msg, hdrs):
--> 639     raise HTTPError(req.full_url, code, msg, hdrs, fp)

HTTPError: HTTP Error 403: Forbidden

Full env printout

Other/Misc.

No response

Code of Conduct

  • I agree to follow THIS PROJECT's Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report

Metadata

Metadata

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