400 Client Error: Bad Request for url: xxxx

Zijian Zhang
  • 24 Oct '19

I need to get HDF5 files of Subhalos like this: 'subhalo': 'http://www.tng-project.org/api/TNG300-1/snapshots/50/subhalos/0/cutout.hdf5'. I write a dict of parameters the same as your tutorial like params={'gas':'Coordinates,ElectronAbundance,GFM_Metals,Density'} and it fails when there is more the one parameter. The same codes worked well several days ago so it confused me.

Dylan Nelson
  • 24 Oct '19

Hi Zijian,

I think a funny thing happened with commas, but this has since been fixed. Can you try again?

Zijian Zhang
  • 25 Oct '19

Still 400. Even the codes that I copy from the tutorial cannot run. (If there is one parameter, it will success.)

Dylan Nelson
  • 25 Oct '19

Hi Zihian,

Yes I see the issue, it was related to a recent switch to HTTPS. Should be all fixed now?

Zijian Zhang
  • 31 Oct '19

Hi Dylan,

Sorry for late reply. I think the bug have been fixed. Thanks for your help!

Judi Singleton
  • 11 Dec '19

mostly links should use HTTPS now

Yun Wang
  • 31 Aug '20

Hi Dylan,
I experienced the smae issues today i.e. 400 client Error: Bad Request for URL, when I run the code of the Task 11 in the API cookbook.

Kaiyi Du
  • 15 Feb '23

Hi Dylan,
I got the " 400 Client Error: Bad Request for url: https://www.tng-project.org/api/TNG300-3/snapshots/80/subhalos/0/cutout.hdf5?gas=GFM_Metals" when I try to download the element abundance of gas, but I can successfully download other fields of the gas i.e. Masses, Coordinates... I don't know what went wrong when I was downloading the GFM_Metals field of the gas.

Dylan Nelson
  • 15 Feb '23
  • Page 1 of 1