pythonhttp-status-code-403loaddata

Error with loading data using StellarGraph


I run this code on Colab more times with no problem,

import stellargraph as sg
from IPython.display import display, HTML
dataset = sg.datasets.Cora()
display(HTML(dataset.description))
G, node_subjects = dataset.load()

but suddenly this error appear

HTTPError: HTTP Error 403: Forbidden

Solution

  • this appear because the url is no longer valid,

    checking source code, https://github.com/stellargraph/stellargraph/blob/9370caed1137c2527523a39212072df1760ca00f/stellargraph/datasets/datasets.py#L104

    paste the url into browser also give you 403

    ultimate reason is seems this university delete all the data or restricted everyone to view it, check https://linqs-data.soe.ucsc.edu/

    cora dataset may be found https://people.cs.umass.edu/~mccallum/data/ or https://web.archive.org/web/20150918182409/http://www.cs.umd.edu/~sen/lbc-proj/data/cora.tgz

    or you could choose to use other datasets for link prediction , wn18 ,etc