In the k2io.py code, there are a few lines at the end which are problematic for 'AMC' format light curve files. The issue is here:
for h in (data.primary_header,hdu.header):
There is no data.primary_header for 'AMC' files, and so the code is unable to add the 'origin', 'program', and 'date' keywords to it, and it crashes. I fixed this by adding a try - except to test whether the data.primary_header exists, but you may wish to fix it some other way.
In the k2io.py code, there are a few lines at the end which are problematic for 'AMC' format light curve files. The issue is here:
for h in (data.primary_header,hdu.header):There is no data.primary_header for 'AMC' files, and so the code is unable to add the 'origin', 'program', and 'date' keywords to it, and it crashes. I fixed this by adding a try - except to test whether the data.primary_header exists, but you may wish to fix it some other way.