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

FileNotFoundError: [Errno 2] No such file or directory: 'osascript' #120

Closed LPPSP closed 3 years ago

LPPSP commented 3 years ago

My os is macOS Bigsur , python version is 3.9. Got following error.

himawaripy 2.2.0
Updating...
Latest version: 2021/05/27 09:10:00 GMT.
Detected offset: UTC+08:00
Offset version: 2021/05/27 07:10:00 GMT.
Downloading tiles...
Downloading tiles: 1/16 completed...
Downloading tiles: 2/16 completed...
Downloading tiles: 3/16 completed...
Downloading tiles: 4/16 completed...
Downloading tiles: 5/16 completed...
Downloading tiles: 6/16 completed...
Downloading tiles: 7/16 completed...
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...
Downloading tiles: 14/16 completed...
Downloading tiles: 15/16 completed...
Downloading tiles: completed.
Saving to '/Users/zg/Library/Caches/himawaripy/himawari-20210527T071000.png'...
Exception in thread himawaripy-main-thread:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/zg/Library/Python/3.9/lib/python/site-packages/himawaripy/__main__.py", line 214, in thread_main
    r = set_background(output_file)
  File "/Users/zg/Library/Python/3.9/lib/python/site-packages/himawaripy/utils.py", line 12, in set_background
    subprocess.call(
  File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'osascript'