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

Error on first execution #58

Closed minils closed 7 years ago

minils commented 8 years ago

I just installed how it is described in the readme and tried to execute $ himawaripy. It downloaded the first 3 chunks and then stops with the following error:

Updating...
Latest version: 2016/07/28 14:20:00 GMT
Offset version: 2016/07/28 06:20:00 GMT

Downloading tiles: 3/16 completedmultiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.5/urllib/request.py", line 1240, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib64/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/usr/lib64/python3.5/http/client.py", line 826, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib64/python3.5/socket.py", line 693, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib64/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg/himawaripy/himawaripy.py", line 53, in download_chunk
    with urlopen(url_format.format(level, width, strftime("%Y/%m/%d/%H%M%S", latest), x, y)) as tile_w:
  File "/usr/lib64/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.5/urllib/request.py", line 465, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.5/urllib/request.py", line 483, in _open
    '_open', req)
  File "/usr/lib64/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.5/urllib/request.py", line 1268, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib64/python3.5/urllib/request.py", line 1242, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -5] No address associated with hostname>
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/himawaripy", line 9, in <module>
    load_entry_point('himawaripy==1.1', 'console_scripts', 'himawaripy')()
  File "/usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg/himawaripy/himawaripy.py", line 88, in main
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 260, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 608, in get
    raise self._value
urllib.error.URLError: <urlopen error [Errno -5] No address associated with hostname>

I am using the following setup: Fedora 24 Gnome 3.20.2 Python 3.5.1

egeesin commented 8 years ago

At first execution, I got similar error. I'm using OS X 10.11.6

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/himawaripy", line 9, in <module>
    load_entry_point('himawaripy==1.1', 'console_scripts', 'himawaripy')()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'himawaripy'
boramalper commented 8 years ago

@minils I don't really know what causes your problem. Can you try it again to see if it recurs? Can you visit http://himawari8.nict.go.jp with your web browser to see if it opens?


@egeesin I don't think that your error is similar at all, can you please open another issue ticket?

minils commented 8 years ago

@boramalper I opened http://himawari8.nict.go.jp/ and it works. I tried to reinstall a few times, but I still receive the same error message.

minils commented 8 years ago

I tried it on my notebook with a similar software configuration and receive this error:

Updating...
Latest version: 2016/08/31 08:40:00 GMT
Offset version: 2016/08/31 00:40:00 GMT

Downloading tiles: 13/64 completedmultiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.5/urllib/request.py", line 1240, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib64/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/usr/lib64/python3.5/http/client.py", line 826, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib64/python3.5/socket.py", line 693, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib64/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg/himawaripy/himawaripy.py", line 57, in download_chunk
    with urlopen(url , timeout=dl_timeout) as tile_w:
  File "/usr/lib64/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.5/urllib/request.py", line 465, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.5/urllib/request.py", line 483, in _open
    '_open', req)
  File "/usr/lib64/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.5/urllib/request.py", line 1268, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib64/python3.5/urllib/request.py", line 1242, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -5] No address associated with hostname>
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/himawaripy", line 9, in <module>
    load_entry_point('himawaripy==1.1', 'console_scripts', 'himawaripy')()
  File "/usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg/himawaripy/himawaripy.py", line 94, in main
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 260, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib64/python3.5/multiprocessing/pool.py", line 608, in get
    raise self._value
urllib.error.URLError: <urlopen error [Errno -5] No address associated with hostname>

So it is able to download like 13 tiles before it is aborted...

boramalper commented 7 years ago

Hello,

in v2 of himawaripy, the script retries for up to 3 times before giving up. I think it will solve your problem since (according to your last message) it was able to download like 13 tiles before it was aborted so it's likely to be a temporary error that ruined the whole process.

can you please make a clean installation of v2 (https://github.com/boramalper/himawaripy/tree/v2) and let me know if it fixes your problem?

Thanks!

minils commented 7 years ago

I did a clean installation with v2 and it WORKS! :+1: Here is the log:

himawaripy 2.0.0
Updating...
Latest version: 2016/10/14 08:30:00 GMT.
Detected offset: UTC+02:00
Offset version: 2016/10/14 00:30:00 GMT.
Downloading tiles...
Downloading tiles: 1/16 completed...
Downloading tiles: 2/16 completed...
Downloading tiles: 3/16 completed...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_1_1.png'...
Downloading tiles: 4/16 completed...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_1_0.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_1_3.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_1_2.png'...
Downloading tiles: 5/16 completed...
Downloading tiles: 6/16 completed...
Downloading tiles: 7/16 completed...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_2_2.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_2_1.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_3_2.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_0_2.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_3_0.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_0_3.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_3_3.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_2_0.png'...
[1/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_3_1.png'...
Downloading tiles: 8/16 completed...
Downloading tiles: 9/16 completed...
Downloading tiles: 10/16 completed...
Downloading tiles: 11/16 completed...
Downloading tiles: 12/16 completed...
Downloading tiles: 13/16 completed...
[2/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_3_2.png'...
Downloading tiles: 14/16 completed...
Downloading tiles: 15/16 completed...
[2/3] Retrying to download 'http://himawari8.nict.go.jp/img/D531106/4d/550/2016/10/14/003000_3_0.png'...
Downloading tiles: completed.
Saving to '~/.cache/himawaripy/himawari-20161014T003000.png'...

Thank you!

boramalper commented 7 years ago

You're welcome! :)