{"action":"created","issue":{"url":"https://api.github.com/repos/spacetelescope/PyFITS/issues/109","repository_url":"https://api.github.com/repos/spacetelescope/PyFITS","labels_url":"https://api.github.com/repos/spacetelescope/PyFITS/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/spacetelescope/PyFITS/issues/109/comments","events_url":"https://api.github.com/repos/spacetelescope/PyFITS/issues/109/events","html_url":"https://github.com/spacetelescope/PyFITS/issues/109","id":166680055,"number":109,"title":"Can't update data in a fits table","user":{"login":"csnap001","id":10412412,"avatar_url":"https://avatars.githubusercontent.com/u/10412412?v=3","gravatar_id":"","url":"https://api.github.com/users/csnap001","html_url":"https://github.com/csnap001","followers_url":"https://api.github.com/users/csnap001/followers","following_url":"https://api.github.com/users/csnap001/following{/other_user}","gists_url":"https://api.github.com/users/csnap001/gists{/gist_id}","starred_url":"https://api.github.com/users/csnap001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csnap001/subscriptions","organizations_url":"https://api.github.com/users/csnap001/orgs","repos_url":"https://api.github.com/users/csnap001/repos","events_url":"https://api.github.com/users/csnap001/events{/privacy}","received_events_url":"https://api.github.com/users/csnap001/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-20T20:56:32Z","updated_at":"2016-07-21T13:34:26Z","closed_at":"2016-07-21T13:34:26Z","body":"I'm trying to update a .fits file and I keep getting the following error:\r\n\r\nTraceback (most recent call last):\r\n\r\n  File \"<ipython-input-31-9c667a8986f9>\", line 1, in <module>\r\n    runfile('C:/Users/owner/Documents/.spyder2/fittingTest.py', wdir='C:/Users/owner/Documents/.spyder2')\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\spyderlib\\widgets\\externalshell\\sitecustomize.py\", line 699, in runfile\r\n    execfile(filename, namespace)\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\spyderlib\\widgets\\externalshell\\sitecustomize.py\", line 74, in execfile\r\n    exec(compile(scripttext, filename, 'exec'), glob, loc)\r\n\r\n  File \"C:/Users/owner/Documents/.spyder2/fittingTest.py\", line 854, in <module>\r\n    fits.update('new.fits', Qname, 'sdss_name')\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\astropy\\io\\fits\\convenience.py\", line 525, in update\r\n    new_hdu = _makehdu(data, header)\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\astropy\\io\\fits\\convenience.py\", line 772, in _makehdu\r\n    hdu = ImageHDU(data)\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\astropy\\io\\fits\\hdu\\image.py\", line 1011, in __init__\r\n    scale_back=scale_back)\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\astropy\\io\\fits\\hdu\\image.py\", line 138, in __init__\r\n    self.data = data\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\astropy\\utils\\decorators.py\", line 526, in __set__\r\n    ret = self.fset(obj, val)\r\n\r\n  File \"C:\\Users\\owner\\Anaconda2\\lib\\site-packages\\astropy\\io\\fits\\hdu\\image.py\", line 236, in data\r\n    self._bitpix = DTYPE2BITPIX[data.dtype.name]\r\n\r\nKeyError: 'object'\r\n\r\n\r\nI figured the issue was with the data type I set for Qname when I changed it to a numpy array. before it is a numpy array Qname's type is list where each element is a str type. I've tried setting the type for the numpy array to be np.str and str, but this returns the same error except that the last line is KeyError: 'String144' instead of what is above.  I don't think I understand what happens when you convert to a numpy array or what the dtype does, can anybody help?  I'm using python 2.7\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spacetelescope/PyFITS/issues/comments/234254323","html_url":"https://github.com/spacetelescope/PyFITS/issues/109#issuecomment-234254323","issue_url":"https://api.github.com/repos/spacetelescope/PyFITS/issues/109","id":234254323,"user":{"login":"pllim","id":2090236,"avatar_url":"https://avatars.githubusercontent.com/u/2090236?v=3","gravatar_id":"","url":"https://api.github.com/users/pllim","html_url":"https://github.com/pllim","followers_url":"https://api.github.com/users/pllim/followers","following_url":"https://api.github.com/users/pllim/following{/other_user}","gists_url":"https://api.github.com/users/pllim/gists{/gist_id}","starred_url":"https://api.github.com/users/pllim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pllim/subscriptions","organizations_url":"https://api.github.com/users/pllim/orgs","repos_url":"https://api.github.com/users/pllim/repos","events_url":"https://api.github.com/users/pllim/events{/privacy}","received_events_url":"https://api.github.com/users/pllim/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T13:34:26Z","updated_at":"2016-07-21T13:34:26Z","body":"Oh wait... In your traceback, you are actually using `astropy.io.fits`. This is not the right place to report your problem. Please open a new issue at https://github.com/astropy/astropy/issues . We can all continue over there."}}
{"actor":{"display_login":"pllim"}}