Elinvention / gnome-shell-extension-nasa-apod

Change your wallpaper daily to the NASA's astronomy picture of the day
https://extensions.gnome.org/extension/1202/nasa-apod/
GNU General Public License v3.0
119 stars 21 forks source link

HTTP error 404 from APOD API #34

Open Rick30024 opened 4 years ago

Rick30024 commented 4 years ago

I keep on getting this message "NASA apod extension error network error HTTP status code 404" when I try to refresh and get an image

Elinvention commented 4 years ago

I need more information. Please fill the template.

marcfj commented 4 years ago

I was getting the same error, investigated by calling the API directly and got the full error message

code | 404 msg | "No data available for date: 2020-08-27"

APOD API supports a date parameter, which defaults to today if not passed. Today for me is in the future as I'm UTC +10, however the API is expecting UTC+0 hence the error. The same API call works fine if I add &date=2020-08-26

Elinvention commented 4 years ago

@marcfj I checked the code and the date parameter gets passed only if you have a pinned background, in which case we are sure the date is correct because the image was already downloaded.

Again, if you don't fill in the template, all I can do is close this issue. If you have any difficulty you can ask me. In particular I need the extension's logs and settings (the last 2 items).

jwzedd commented 3 years ago

Hello, I have used your extension on my older pc and really liked seeing the images and learning something new each day. I have a relatively new System 76 pc and loaded the NASA APOD extension.Unfortunately, I am also getting the error message "NASA apod extension error network error HTTP status code 404" when I try to refresh. The extension updated twice and now it does not. I am using PopOS, based upon Ubuntu 20.04. My Gnome shell is version 3.36.4. The Gnome log is attached. Any help is appreciated.

2020.09.26_NASA_APOD_Gnome_log.txt

jwzedd commented 3 years ago

Hello, I have used your extension on my older pc and really liked seeing the images and learning something new each day. I have a relatively new System 76 pc and loaded the NASA APOD extension.Unfortunately, I am also getting the error message "NASA apod extension error network error HTTP status code 404" when I try to refresh. The extension updated twice and now it does not. I am using PopOS, based upon Ubuntu 20.04. My Gnome shell is version 3.36.4. The Gnome log is attached. Any help is appreciated.

2020.09.26_NASA_APOD_Gnome_log.txt

Seems to be working now.

TastyPi commented 3 years ago

This happens when requesting the image for the current date, but the current date's image is not available yet.

For example, right now the current image displayed at https://apod.nasa.gov/apod/ is for 27th October, however if I call the API without setting the date it uses 2020-10-28, as can be seen in the 404 response:

{"code":404,"msg":"No data available for date: 2020-10-28","service_version":"v1"}

See this issue https://github.com/nasa/apod-api/issues/48 which mentions a couple of workarounds.