boramalper / himawaripy

Set near-realtime picture of Earth as your desktop background
http://labs.boramalper.org/himawaripy
MIT License
1.62k stars 239 forks source link

urllib.error.HTTPError: HTTP Error 404: Not Found #116

Closed RogerMonkey closed 3 years ago

RogerMonkey commented 3 years ago

hi there~ It seems that the origin url has failed and the picture cannot be download correctly. The errors are shown below

Updating...
[1/3] Retrying to download 'http://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json'...
[2/3] Retrying to download 'http://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json'...
[3/3] Retrying to download 'http://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json'...
Exception in thread himawaripy-main-thread:
Traceback (most recent call last):
  File "/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/anaconda3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/anaconda3/lib/python3.6/site-packages/himawaripy/__main__.py", line 154, in thread_main
    latest_json = download("http://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json")
  File "/anaconda3/lib/python3.6/site-packages/himawaripy/__main__.py", line 142, in download
    raise exception
  File "/anaconda3/lib/python3.6/site-packages/himawaripy/__main__.py", line 133, in download
    with urllib.request.urlopen(url) as response:
  File "/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/anaconda3/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/anaconda3/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/anaconda3/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/anaconda3/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

thanks for your time~

arbaleast commented 3 years ago

I also meet same problem,how to work out it?

Dumail commented 3 years ago

me too!

boramalper commented 3 years ago

Fixed thanks to @fiercedruid!