flatangle/flatlib

IndexError: tuple index out of range, while running example from flatlib documentation

Opened this issue · 0 comments

While running following first example from flatlib documentation:

date = Datetime('2015/03/13', '17:00', '+00:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

its throwing IndexError.
Traceback is:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/astrology/.venv/lib/python3.12/site-packages/flatlib/chart.py", line 53, in __init__
    self.objects = ephem.getObjectList(IDs, date, pos)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/astrology/.venv/lib/python3.12/site-packages/flatlib/ephem/ephem.py", line 34, in getObjectList
    objList = [getObject(ID, date, pos) for ID in IDs]
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/astrology/.venv/lib/python3.12/site-packages/flatlib/ephem/ephem.py", line 29, in getObject
    obj = eph.getObject(ID, date.jd, pos.lat, pos.lon)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/astrology/.venv/lib/python3.12/site-packages/flatlib/ephem/eph.py", line 48, in getObject
    obj = swe.sweObject(ID, jd)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/astrology/.venv/lib/python3.12/site-packages/flatlib/ephem/swe.py", line 71, in sweObject
    'lonspeed': sweList[3],
                ~~~~~~~^^^
IndexError: tuple index out of range