beltoforion / stellarium-to-video

Making videos of the night sky with Stellarium
http://beltoforion.de/en/stellarium_video
BSD 2-Clause "Simplified" License
26 stars 10 forks source link

AttributeError: module 'skyfield.almanac' has no attribute 'find_settings' #22

Closed sugizo closed 8 months ago

sugizo commented 8 months ago

env wsl debian (windows subsidiary linux)

prerequisites

sudo apt update
sudo apt install -y python3-skyfield python3-isodate python3-geopy stellarium ffmpeg

execute

python3 /mnt/c/stellarium-to-video/stellarium-to-video.py \
-ts PT2H -dt PT1M -o /mnt/c/Users/sugizo/Downloads/berlin.mp4 \
-v 90,25,70 \
-d 2024-09-25 \
-l Berlin -c "The Sky over Berlin"

result

Traceback (most recent call last):
  File "/mnt/c/stellarium-to-video/stellarium-to-video.py", line 486, in <module>
    main()
  File "/mnt/c/stellarium-to-video/stellarium-to-video.py", line 448, in main
    param = Parameters(parser.parse_args())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/stellarium-to-video/stellarium-to-video.py", line 43, in __init__
    self.__start_date : datetime = self.__determine_start_time(args.date)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/stellarium-to-video/stellarium-to-video.py", line 67, in __determine_start_time
    t_set, y_set = almanac.find_settings(observer, eph['Sun'], t0, t1)
                   ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'skyfield.almanac' has no attribute 'find_settings'

expected result have video generated in /mnt/c/Users/sugizo/Downloads/berlin.mp4

best regards

beltoforion commented 8 months ago

Please install python dependencies with pip like specified on the webpage. (https://beltoforion.de/en/stellarium_video/index.php) Linux distributions tend to ship outdated software versions. There is no guarantee sudo apt will install the right version of a python package. It most certainly wont. You must use pip and the requirements.txt to install the python dependencies as specified on the web page. This is the only way to ensure you get the correct version of a python package.