🏠 back to Observable

gist dataset and cors

Hi,

I’m trying to understand why some of my dataset load while others don’t.

In the above notebook, for example “https://gist.githubusercontent.com/maliky/04c48dd876abcf59733ea1cec89a55d4/raw/197b6a713f60667445e5aa679c0bfcc8b6a9e972/ddl_c18_prec5.json”, will load but
https://gist.github.com/maliky/bc08277089a1e6de68be64a0c80b3f3e/raw/c1b370fb1f5a39f9dfdc18cea625cf65c2982719/va_c17_prec5.json” will not.

Both datasets where generated with the same code, parsing a graph-tool network to json.

In the debugger console I notice a lot of COR errors such as
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://gist.github.com/maliky/bc08277089a1e6de68be64a0c80b3f3e/raw/c1b370fb1f5a39f9dfdc18cea625cf65c2982719/va_c17_prec5.json. (Reason: CORS request did not succeed).

Why is that ?

The url is not the same in your dataset object. I made a fork here:
notebook

1 Like

Ok, got it. Thank you.

It’s gist.github.com that should be gist.githubusercontent.com

I made the error because I copied and pasted the location of the ‘raw’ button link pointing to gist.github.com/… and not to gist.githubusercontent.com/… I did not expect a redirection to occur there.

Also I did not want to open the raw file because, yesterday, I every bits I was downloading were expensive for me.

Thank you again… I guess Observable is some sens is the successor of IBM’s many-eyes :o)

1 Like