<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Could it be linked to the your duplicated column named “R” ? see a screen shot enclosed.</div><div class="">Cheers</div><div class="">Yanbin</div><img apple-inline="yes" id="67A09487-112B-4276-BC47-06A7F82A77B0" src="cid:07ABB7F3-6264-43E5-AE9D-027312D56EAD" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 8 Dec 2020, at 08:58, Judith Irwin <<a href="mailto:irwinja@queensu.ca" class="">irwinja@queensu.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Could someone help with this problem? I want to read a fits table and write out a .csv file. Here is what I'm doing:</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">>>> import astropy<div class="">>>> from astropy.table import Table</div><div class="">>>> from<span class="Apple-converted-space"> </span><a href="http://astropy.io/" class="">astropy.io</a><span class="Apple-converted-space"> </span>import ascii</div><div class="">>>> t=Table.read('merged_0.3-7_newerr_src.fits')</div><div class="">>>> print t<div class=""> RA DEC RA_ERR DEC_ERR X ... 797_OFFAXS_ANG WEIGHT_OFFAXS WANG_ERR POS_ERR </div><div class=""> deg deg deg deg pix ... arcmin arcmin arcmin arcmin </div><div class="">------------- ------------- ----------------- ----------------- ------------- ... -------------- -------------- ---------------- ----------------</div><div class="">190.491776756 32.4809974381 7.81833679753e-06 4.8707159408e-06 4071.66367713 ... 2.958585048 2.958585048 0.00652461345853 0.00654797997354</div><div class="">190.490783106 32.4956819235 2.04948640032e-05 3.86556461152e-05 4077.8 ... 2.07617011778 2.07617011778 0.00490486335967 0.00556319682508</div>(I'm only showing the first rows of the table)</div><div class="">>>> ascii.write(t, 'Xsources_new.csv', format='csv',overwrite=True)</div><div class="">Traceback (most recent call last):<div class=""> File "<stdin>", line 1, in <module></div><div class=""> File "/home/irwin/.local/lib/python2.7/site-packages/astropy/io/ascii/ui.py", line 733, in write</div><div class=""> writer.write(table, output)</div><div class=""> File "/home/irwin/.local/lib/python2.7/site-packages/astropy/io/ascii/fastbasic.py", line 179, in write</div><div class=""> self._write(table, output, {'fill_values': [(core.masked, '')]})</div><div class=""> File "/home/irwin/.local/lib/python2.7/site-packages/astropy/io/ascii/fastbasic.py", line 156, in _write</div><div class=""> writer.write(output, header_output, output_types)</div><div class=""> File "astropy/io/ascii/cparser.pyx", line 1036, in astropy.io.ascii.cparser.FastWriter.write</div><div class="">TypeError: unhashable type: 'list'</div><div class="">>>> ascii.write(t, 'Xsources_new.csv', format='csv',overwrite=True,comment=False)</div><div class="">Traceback (most recent call last):</div><div class=""> File "<stdin>", line 1, in <module></div><div class=""> File "/home/irwin/.local/lib/python2.7/site-packages/astropy/io/ascii/ui.py", line 733, in write</div><div class=""> writer.write(table, output)</div><div class=""> File "/home/irwin/.local/lib/python2.7/site-packages/astropy/io/ascii/fastbasic.py", line 179, in write</div><div class=""> self._write(table, output, {'fill_values': [(core.masked, '')]})</div><div class=""> File "/home/irwin/.local/lib/python2.7/site-packages/astropy/io/ascii/fastbasic.py", line 156, in _write</div><div class=""> writer.write(output, header_output, output_types)</div><div class=""> File "astropy/io/ascii/cparser.pyx", line 1036, in astropy.io.ascii.cparser.FastWriter.write</div><div class="">TypeError: unhashable type: 'list'</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I also tried comment=False in the write statement. I include the input file as an attachment. Thanks.</div><div class=""><br class=""></div><div class="">Judith</div></div></div><br style="caret-color: rgb(0, 0, 0); font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span id="cid:B4CC09AE-07C7-4BA2-9121-8CFFFCFBCC23"><merged_0.3-7_newerr_src.fits></span><span style="caret-color: rgb(0, 0, 0); font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">AstroPy mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:AstroPy@python.org" style="font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">AstroPy@python.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="https://mail.python.org/mailman/listinfo/astropy" style="font-family: Kurier-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mail.python.org/mailman/listinfo/astropy</a></div></blockquote></div><br class=""></body></html>