<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: monospace; ">I am a big fan on atpy and use it extensively in reading IPAC/IRSA tables. However I get this error </span><div><span class="Apple-style-span" style="font-family: monospace; ">when trying to append two tables with strings that I do not understand. Does anyone know what is happening</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">and how to get around it</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; "><br></span><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">import atpy<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t = atpy.Table()<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">name = ["aa","bb","cc"]<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t.add_column("name",name)<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">k = [1,2,3]<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t.add_column("num",k)<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t<br></blockquote></blockquote></blockquote><span class="Apple-style-span" style="font-family: monospace; "><Table name='None' rows=3 fields=2></span><span class="Apple-style-span" style="font-family: monospace; "><br></span><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">name = ["aaa","bbb","ccc"]<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">p = atpy.Table()<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">p.add_column("name",name)<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">p.add_column("num",k)<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t.append(p)<br></blockquote></blockquote></blockquote><span class="Apple-style-span" style="font-family: monospace; ">Traceback (most recent call last):</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">File "<stdin>", line 1, in <module></span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/atpy/basetable.py", line 301, in append</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">  raise Exception("Columns do not match")</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">Exception: Columns do not match</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">nn = t.name.astype("|S3")<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t.remove_columns("name")<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t.add_column("name",nn)<br></blockquote></blockquote></blockquote><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite">t.append(p)<br></blockquote></blockquote></blockquote><span class="Apple-style-span" style="font-family: monospace; ">Traceback (most recent call last):</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">File "<stdin>", line 1, in <module></span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/atpy/basetable.py", line 302, in append</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">  self.data = np.hstack((self.data, table.data))</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/shape_base.py", line 258, in hstack</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">  return _nx.concatenate(map(atleast_1d,tup),1)</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">TypeError: expected a readable buffer object</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><blockquote type="cite" style="font-family: monospace; "><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">Cheers</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; "> Tommy</span></div></body></html>