Repository navigation
IPAC table read error #4684
Description
Activity
Can you provide a minimal snippet of the file that fails so we can reproduce your problem?
My apologies. I thought I had. I have uploaded it now.
I'm guessing now that you are on Windows, where the default numpy
intis 32-bits. We need to think about a good way of addressing this, but on windows by default when you read int data it will come out as 32 bits. In your case the values are larger than 32 bits can support so that's why you see the warning. Here is a workaround that you can try:In [24]: from astropy.io import ascii In [26]: ascii.core.TableOutputter.default_converters[0] = ascii.core.convert_numpy(np.int64) In [27]: t = Table.read('IPAC_Example.tbl', format='ascii.ipac') In [28]: t Out[28]: <Table masked=True length=32> source_id_mf ra dec nb na ... z spt_ind htm20 dist angle deg deg ... arcsec deg str20 float64 float64 int64 int64 ... float64 int64 int64 float64 float64 -------------------- ----------- ---------- ----- ----- ... -------------- --------- -------------- -------- ---------- 3052p318_ac51-055314 305.7726835 32.4414689 1 0 ... 0.536437752827 203323010 14272479624209 1.067433 208.287782 3052p318_ac51-055314 305.7726835 32.4414689 1 0 ... 0.536437752827 203323010 14272479624209 1.067433 208.287782Indeed I am working on a windows. Thank you! That worked.
See #4686 for a potential fix.
Following the links through, I suppose that #5347 has addressed this issue.
Please reopen if you find otherwise, I can't test it locally (as it works as expected on non-windows).
Hell everyone,
I'm having a problem with reading this IPAC table. It gives me the following error:
WARNING: OverflowError converting to IntType for column cntr, using string instead. [astropy.io.ascii.core]
When presenting these commands:
I get this error no matter how I initiate "ip" -- whether leaving it default or otherwise. This isn't the only column to which this occurred and I deleted previous ones that created the problem in case that was the issue.
Any thoughts?
-Rahul Patel