from astroquery.jplhorizons import Horizons
from astroquery.jplhorizons import conf
conf.horizons_server = 'https://ssd.jpl.nasa.gov/horizons_batch.cgi'
obj = Horizons(id='Ceres', location='568',
epochs={'start':'2010-01-01',
'stop':'2010-03-01',
'step':'10d'})
print(obj.ephemerides())
According to the astroquery.jplhorizons documentation, the format for the start and stop time in the epochs dictionary should be “YYYY-MM-DD [HH:MM:SS]”. However, the following code fails:
from astroquery.jplhorizons import Horizons
from astroquery.jplhorizons import conf
conf.horizons_server = 'https://ssd.jpl.nasa.gov/horizons_batch.cgi'
obj = Horizons(id='Ceres', location='568',
epochs={'start':'2010-01-01 12:00:00',
'stop':'2010-03-01',
'step':'10d'})
print(obj.ephemerides())
fails with an error (IOError: Cannot parse table column names.), as its request to the JPL server receives the following response:
INPUT ERROR in VLADD in following line:
START_TIME = 2010-01-01 12:00:00
Too many constants ^
BATVAR: problem loading execution-control setting:
LINE=START_TIME = 2010-01-01 12:00:00
WLDINI: error loading execution-control file.
!$$SOF
TABLE_TYPE = OBSERVER
QUANTITIES = "1,3,4,8,9,10,18,19,20,21,23,24,27,31,33,36"
COMMAND = "Ceres;"
CENTER = '568'
SOLAR_ELONG = "0,180"
LHA_CUTOFF = 0
CSV_FORMAT = YES
CAL_FORMAT = BOTH
ANG_FORMAT = DEG
START_TIME = 2010-01-01 12:00:00
STOP_TIME = 2010-03-01
STEP_SIZE = 10d
SKIP_DAYLT = NO
The issue seems to be that the START_TIME value is not wrapped in quotes.
The following code runs fine:
According to the astroquery.jplhorizons documentation, the format for the start and stop time in the epochs dictionary should be “YYYY-MM-DD [HH:MM:SS]”. However, the following code fails:
fails with an error (
IOError: Cannot parse table column names.
), as its request to the JPL server receives the following response:The issue seems to be that the START_TIME value is not wrapped in quotes.