scverse / squidpy

Spatial Single Cell Analysis in Python
https://squidpy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
440 stars 82 forks source link

Failed to open the url with default certificates, trying with certifi. HTTPError: HTTP Error 403: Forbidden #839

Closed asmlgkj closed 5 months ago

asmlgkj commented 5 months ago

Description

...

Minimal reproducible example

import numpy as np

import scanpy as sc
import squidpy as sq

sc.logging.print_header()
print(f"squidpy=={sq.__version__}")

# load the pre-processed dataset
adata = sq.datasets.seqfish()

Traceback

<Failed to open the url with default certificates, trying with certifi. HTTPError: HTTP Error 403: Forbidden>

...

Version

...

LLehner commented 5 months ago

Hi @asmlgkj, which version of squidpy are you using?

asmlgkj commented 5 months ago

Hi @asmlgkj, which version of squidpy are you using?

scanpy==1.9.8 anndata==0.9.1 umap==0.5.3 numpy==1.22.4 scipy==1.10.1 pandas==2.0.1 scikit-learn==1.2.2 statsmodels==0.14.0 igraph==0.10.4 louvain==0.8.2 pynndescent==0.5.10 squidpy==1.2.3

I am in Mainland China. Thanks a lot

LLehner commented 5 months ago

Thanks, version 1.2.3 is quite old, could you update squidpy and try again? Because loading the data set shouldn't be an issue from squidpy.

asmlgkj commented 5 months ago

thanks a lot. I used pip install --upgrade squidpy, but still the same as previous, 1.2.3. My python is 3.8.6, is there related, thanks a lot @LLehner

asmlgkj commented 5 months ago

I make a new env, as following scanpy==1.9.5 anndata==0.9.2 umap==0.5.6 numpy==1.24.3 scipy==1.11.3 pandas==2.2.2 scikit-learn==1.3.0 statsmodels==0.14.1 igraph==0.11.5 pynndescent==0.5.12 squidpy==1.5.0

import numpy as np

import scanpy as sc import squidpy as sq

sc.logging.print_header() print(f"squidpy=={sq.version}")

load the pre-processed dataset

adata = sq.datasets.seqfish() but still the same error WARNING: Failed to open the url with default certificates, trying with certifi.

LLehner commented 5 months ago

sq.datasets.seqfish() is just loading the data from this url: https://ndownloader.figshare.com/files/26098403

image

Can you open the link?

asmlgkj commented 5 months ago

in my centos, it can not (without vpn) curl -I https://ndownloader.figshare.com/files/26098403 HTTP/2 403 server: awselb/2.0 date: Wed, 12 Jun 2024 09:06:05 GMT content-type: text/html content-length: 118

but in my windows, it can open and download one file,

so I download it through windows, and upload it to centos, and

import numpy as np import os import scanpy as sc import squidpy as sq

sc.logging.print_header() print(f"squidpy=={sq.version}") adata = sc.read_h5ad('seqfish.h5ad')

it works now.

Thank you so much. I am learning the https://squidpy.readthedocs.io/en/stable/notebooks/tutorials/index.html

is there a link correspond to the inner dataset, such as adata = sq.datasets.seqfish() and https://ndownloader.figshare.com/files/26098403

I want to get all, so that I can run the examples or how can I get the function scrrenshot you showed to me

LLehner commented 5 months ago

Thank you for your interest in squidpy.

The links to the datasets are here https://github.com/scverse/squidpy/blob/main/src/squidpy/datasets/_dataset.py.

If it works for you now, I would close the issue, but it seems like it was no related to squidpy itself.

asmlgkj commented 5 months ago

Thanks a lot