<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>I want to use the "ñ" character in a fit header. The verify in astropy is giving me an error.<br><br>WARNING: VerifyWarning: Card 'OBSERVER' is not FITS standard (invalid value string: 'Maria Rosa Mu�oz '). Fixed 'OBSERVER' card to meet the FITS standard. [astropy.io.fits.verify]<br>
ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 1946: ordinal not in range(128) [astropy.io.fits.header]<br>Traceback (most recent call last):<br> File "./fixfitheader.py", line 30, in <module><br>
hdulist.writeto(sys.argv[2]+'/'+filename, output_verify='fix')<br> File "/usr/local/lib/python2.6/dist-packages/astropy/io/fits/hdu/hdulist.py", line 675, in writeto<br> hdu._writeto(hdulist.__file)<br>
File "/usr/local/lib/python2.6/dist-packages/astropy/io/fits/hdu/base.py", line 497, in _writeto<br> self._writeheader(fileobj)<br> File "/usr/local/lib/python2.6/dist-packages/astropy/io/fits/hdu/base.py", line 428, in _writeheader<br>
self._header.tofile(fileobj)<br> File "/usr/local/lib/python2.6/dist-packages/astropy/io/fits/header.py", line 625, in tofile<br> fileobj.write(blocks.encode('ascii'))<br>UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 1946: ordinal not in range(128)<br>
<br></div>Is there a solution for this issue?<br><br></div><div>Thanks.<br></div>BR<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Leticia.<br></font></span></div>
</div><br></div>