g-battaglia / kerykeion

Data driven Astrology 💫
Kerykeion is a python library for astrology. It can generate SVG charts and extract all data about a birthchart, a synastry chart and a transit chart.
https://kerykeion.net
GNU Affero General Public License v3.0
297 stars 103 forks source link

Operating system specific format string #131

Closed JustinHildenbrand closed 2 weeks ago

JustinHildenbrand commented 2 weeks ago

In Windows, '-' is not supported to eliminate leading zeros in datetime.strftime. Instead, '#' should be used. Trying to use '-' for this purpose in Windows raises a ValueError with description "Invalid format string". For cross-platform compatibility, consider checking the OS then selecting the appropriate formatting string.

https://github.com/g-battaglia/kerykeion/blob/ce3cbc82df0bd8bc8862b60d21d63704fa8737d5/kerykeion/charts/kerykeion_chart_svg.py#L575

g-battaglia commented 2 weeks ago

Hi, @JustinHildenbrand, thanks for reporting the issue! Should be fixed in V4.16.5, can you confirm?