0
Completed

TypeError with astroquery ans ESASky

ABremond 5 years ago updated by Henrik 5 years ago 1

Hello

when I try the scipt found on ESASky I get a Ty peError:

maps['XMM-OM-OPTICAL']['observation_id', 'instrument', 'filter', 'duration'].pprint()  gives this

TypeError: TableLists can only be indexed with the named keys and integers.

Could you help me ?

Many Thanks

Completed

Hello ABremond,

My guess is that you have queried a region where there are no XMM-OM-OPTICAL observations. The missions that have zero results will not show up in the ‘maps’ variable.

You can test whether this is true by checking which missions have entries in the TableList (i.e. maps). One way to do this is with the print function:

print(maps)

If you tell me what area you have queried (which command you used to fill the 'maps' variable) I can manually check whether there should be any XMM-OM-OPTICAL in that area.

Cheers,

Henrik, on behalf of the ESASky team