{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4779","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4779/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4779/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4779/events","html_url":"https://github.com/astropy/astropy/pull/4779","id":148285336,"number":4779,"title":"Reraise an IOError for files that can't be opened.","user":{"login":"evertrol","id":735460,"avatar_url":"https://avatars.githubusercontent.com/u/735460?v=3","gravatar_id":"","url":"https://api.github.com/users/evertrol","html_url":"https://github.com/evertrol","followers_url":"https://api.github.com/users/evertrol/followers","following_url":"https://api.github.com/users/evertrol/following{/other_user}","gists_url":"https://api.github.com/users/evertrol/gists{/gist_id}","starred_url":"https://api.github.com/users/evertrol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evertrol/subscriptions","organizations_url":"https://api.github.com/users/evertrol/orgs","repos_url":"https://api.github.com/users/evertrol/repos","events_url":"https://api.github.com/users/evertrol/events{/privacy}","received_events_url":"https://api.github.com/users/evertrol/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/io.registry","name":"io.registry","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-04-14T08:11:02Z","updated_at":"2016-04-16T15:16:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4779","html_url":"https://github.com/astropy/astropy/pull/4779","diff_url":"https://github.com/astropy/astropy/pull/4779.diff","patch_url":"https://github.com/astropy/astropy/pull/4779.patch"},"body":"If a file can't be opened for reading, the registry read function\r\nshould not attempt to determine the format further, but raise the\r\ncorresponding exception.\r\n\r\nIf instead, the code proceeds to attempt to determine the format for\r\nan unknown extension for a file that does not exist, it will fail\r\nwith, essentially, the incorrect error (\"Format could not be\r\nidentified\"). Confusingly then, if the file with the unknown extension\r\ndoes exist, the format might very well be identified. An example would\r\na FITS file with the name test.fts."},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/210836574","html_url":"https://github.com/astropy/astropy/pull/4779#issuecomment-210836574","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4779","id":210836574,"user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T15:16:45Z","updated_at":"2016-04-16T15:16:45Z","body":"@evertrol - thanks for this! In my view, it makes sense to raise an IOError if the file does not exist, and I think it's just an oversight that the identifier functions don't always check the existence of a file. So I would be enclined to update the test to create an ``abc`` file, and then add another test to make sure an ``IOError`` is raised if a file does not exist. I think that corner cases where people actually expect the identifiers to work without the file existing should be rare.\r\n\r\n@taldcroft - what do you think?"}}