txoof / PaperPi

E-Paper display loop with plugins
106 stars 10 forks source link

Moon plugin throws error when trying to set date/time string #106

Closed txoof closed 1 year ago

txoof commented 1 year ago

Describe the bug Moon plugin throws moon_phase:_process_data:321 :WARNING - error setting date time: fromisoformat: argument must be str and displays error message.

To Reproduce Steps to reproduce the behavior:

  1. Run pluggin

Expected behavior should display moon

Hardware

OS Info Run cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

[main] Section of Config Copy and paste the [main] section of your config file

# CONFIG_VERSION=1
[main]
# waveshare display type use HD for IT8951 displays
display_type = HD
# required vcom value for IT8951 screens
vcom = -1.93
# maximum refresh between total screen clear for HD displays
max_refresh = 6
# logging output level
log_level = WARNING
# display splash screen (True or False)
splash = True
# rotation of EPD display
# (cable bottom: 0; cable left: -90; cable right: 90; cable top: 180)
rotation = 0
# mirror screen outuput - useful if output to screen appears backwards
mirror = False

Plugin Issues Copy and paste the [Plugin: Your Plugin] section of your config file

[Plugin: Moon Phase]
# default layout
layout = moon_only
plugin = moon_phase
min_display_time = 50
max_priority = 2
# your email address for MET.no API access -- failure to specify may lead to a perma-ban
email = removed
# Timezone locale name in Region/City format (see --run_plugin_func moon_phase.list_country_locales)
# Use a known city in your timezone; this is critical for calculating the moonrise time
location_name = Europe/Amsterdam
# lat/lon of your physical location (optional) (see --run_plugin_func moon_phase.get_coord)
lat = 52.
lon = 4

Additional context Problem appeared on 25 June around 04:00. Prior to that plugin was working as expected.

txoof commented 1 year ago

The problem arises because during certain parts of the year, the moon does not "set" or "rise", but remains in the sky for more than a day.

Currently (25 June 2023) the moonset is None.

txoof commented 1 year ago

resolved with #107