-
-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
I encountered a rare edge case where a specific combination of latitude and birth time causes AstrologicalSubject to raise an error during house calculation.
This only occurs to me with this very specific datetime + location combination.
I shifted the birth time by 1 minute or the date by 1 day, it works fine as exprected
Here's the code to reproduce the error
from kerykeion import AstrologicalSubject
def get_chart() -> any:
birth_year = 2023
birth_month = 3
birth_day = 17
birth_hour = 14
birth_minute = 30
latitude = 24.3132368
longitude = 76.5221078
city = "Jhalawar"
country_code = "IN"
tz_str = "Asia/Kolkata"
try:
subject = AstrologicalSubject(
"Native",
birth_year, birth_month, birth_day,
birth_hour, birth_minute,
lng=longitude, lat=latitude,
tz_str=tz_str,
city=city, nation=country_code,
zodiac_type="Sidereal",
sidereal_mode="LAHIRI"
)
except Exception as e:
return e
return subject
if __name__ == "__main__":
print(get_chart())
Expected output:
- It should return a valid chart without throwing this exception error.
Actual output:
Error in house calculation, planet: 278.91912462694995, houses: (98.91912462694998, 123.59449211448738, 151.93854125279213, 184.03102407800813, 217.37620913190696, 249.2337785390238, 278.91912462695, 303.5944921144874, 331.93854125279216, 4.031024078008134, 37.37620913190699, 69.2337785390238)
This is what Mr ChatGPT says about the error (AI generated):
- Kerykeion → pyswisseph (swe_houses) throws when planet longitude exactly equals cusp longitude. So even if you shift time slightly, depending on your lat/long and timezone, it can still compute the same floating-point result (278.919… in your trace).
Please look into it, would appreciate that.
kashishkumawat
Metadata
Metadata
Assignees
Labels
No labels