{"action":"closed","issue":{"url":"https://api.github.com/repos/axiom-data-science/wera2netcdf/issues/1","repository_url":"https://api.github.com/repos/axiom-data-science/wera2netcdf","labels_url":"https://api.github.com/repos/axiom-data-science/wera2netcdf/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/axiom-data-science/wera2netcdf/issues/1/comments","events_url":"https://api.github.com/repos/axiom-data-science/wera2netcdf/issues/1/events","html_url":"https://github.com/axiom-data-science/wera2netcdf/issues/1","id":133742359,"number":1,"title":"Write an empty data file when the ASCII file is empty","user":{"login":"kwilcox","id":13939,"avatar_url":"https://avatars.githubusercontent.com/u/13939?v=3","gravatar_id":"","url":"https://api.github.com/users/kwilcox","html_url":"https://github.com/kwilcox","followers_url":"https://api.github.com/users/kwilcox/followers","following_url":"https://api.github.com/users/kwilcox/following{/other_user}","gists_url":"https://api.github.com/users/kwilcox/gists{/gist_id}","starred_url":"https://api.github.com/users/kwilcox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwilcox/subscriptions","organizations_url":"https://api.github.com/users/kwilcox/orgs","repos_url":"https://api.github.com/users/kwilcox/repos","events_url":"https://api.github.com/users/kwilcox/events{/privacy}","received_events_url":"https://api.github.com/users/kwilcox/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-15T15:34:44Z","updated_at":"2016-02-15T17:55:02Z","closed_at":"2016-02-15T17:55:02Z","body":"Currently, an exception is raised and no file is written:\r\n\r\n```\r\nRuntime error:\r\nTraceback (most recent call last):\r\n  File \"/opt/conda/lib/python3.4/site-packages/luigi/worker.py\", line 147, in run\r\n    new_deps = self._run_get_new_deps()\r\n  File \"/opt/conda/lib/python3.4/site-packages/luigi/worker.py\", line 98, in _run_get_new_deps\r\n    task_gen = self.task.run()\r\n  File \"/packrat/packrat/grids/projects/secoora/tampa_bay_wera/tampa_bay_wera.py\", line 63, in run\r\n    w = WeraAsciiTotals(self.input().path)\r\n  File \"/opt/conda/lib/python3.4/site-packages/wera2netcdf/wera.py\", line 21, in __init__\r\n    self.data = pd.read_csv(ascii_file, skiprows=[0, 1, 2, 3, 4, 5, 6, 7, 8, 10], sep=' ', skipinitialspace=True, header=0)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py\", line 498, in parser_f\r\n    return _read(filepath_or_buffer, kwds)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py\", line 275, in _read\r\n    parser = TextFileReader(filepath_or_buffer, **kwds)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py\", line 590, in __init__\r\n    self._make_engine(self.engine)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py\", line 731, in _make_engine\r\n    self._engine = CParserWrapper(self.f, **self.options)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py\", line 1103, in __init__\r\n    self._reader = _parser.TextReader(src, **kwds)\r\n  File \"pandas/parser.pyx\", line 518, in pandas.parser.TextReader.__cinit__ (pandas/parser.c:5030)\r\nValueError: No columns to parse from file\r\n```\r\n\r\n```\r\nRuntime error:\r\nTraceback (most recent call last):\r\n  File \"/opt/conda/lib/python3.4/site-packages/luigi/worker.py\", line 147, in run\r\n    new_deps = self._run_get_new_deps()\r\n  File \"/opt/conda/lib/python3.4/site-packages/luigi/worker.py\", line 98, in _run_get_new_deps\r\n    task_gen = self.task.run()\r\n  File \"/packrat/packrat/grids/projects/secoora/tampa_bay_wera/tampa_bay_wera.py\", line 63, in run\r\n    w = WeraAsciiTotals(self.input().path)\r\n  File \"/opt/conda/lib/python3.4/site-packages/wera2netcdf/wera.py\", line 25, in __init__\r\n    self.origin_x = ogm['LON(1,1)'][0]\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/core/frame.py\", line 1969, in __getitem__\r\n    return self._getitem_column(key)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/core/frame.py\", line 1976, in _getitem_column\r\n    return self._get_item_cache(key)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/core/generic.py\", line 1091, in _get_item_cache\r\n    values = self._data.get(item)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/core/internals.py\", line 3211, in get\r\n    loc = self.items.get_loc(item)\r\n  File \"/opt/conda/lib/python3.4/site-packages/pandas/core/index.py\", line 1759, in get_loc\r\n    return self._engine.get_loc(key)\r\n  File \"pandas/index.pyx\", line 137, in pandas.index.IndexEngine.get_loc (pandas/index.c:3979)\r\n  File \"pandas/index.pyx\", line 157, in pandas.index.IndexEngine.get_loc (pandas/index.c:3843)\r\n  File \"pandas/hashtable.pyx\", line 668, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12265)\r\n  File \"pandas/hashtable.pyx\", line 676, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12216)\r\nKeyError: 'LON(1,1)'\r\n```"}}