Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Scotland Hospitalizations datasource fails to run (changed excel schema again) #179

Open
themonk911 opened this issue Sep 16, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@themonk911
Copy link
Contributor

"Traceback (most recent call last):
  File "/env/lib/python3.7/site-packages/xlrd/book.py", line 474, in sheet_by_name
    sheetx = self._sheet_names.index(sheet_name)
ValueError: 'Table 3a - Hospital Confirmed' is not in list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vmagent/app/lib/pipeline.py", line 163, in _run_wrapper
    return data_source.run(output_folder, cache, aux)
  File "/home/vmagent/app/lib/data_source.py", line 227, in run
    data = self.parse(data, {name: df.copy() for name, df in aux.items()}, **parse_opts)
  File "/home/vmagent/app/pipelines/hospitalizations/gb_authority.py", line 52, in parse
    sources[0], sheet_name="Table 3a - Hospital Confirmed", value_name="new_hospitalized"
  File "/home/vmagent/app/pipelines/hospitalizations/gb_authority.py", line 26, in _parse
    data = read_file(file_path, sheet_name=sheet_name)
  File "/home/vmagent/app/lib/io.py", line 99, in read_file
    return pandas.read_excel(path, **{**default_read_opts, **read_opts})
  File "/env/lib/python3.7/site-packages/pandas/util/_decorators.py", line 296, in wrapper
    return func(*args, **kwargs)
  File "/env/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 334, in read_excel
    mangle_dupe_cols=mangle_dupe_cols,
  File "/env/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 926, in parse
    **kwds,
  File "/env/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 439, in parse
    sheet = self.get_sheet_by_name(asheetname)
  File "/env/lib/python3.7/site-packages/pandas/io/excel/_xlrd.py", line 44, in get_sheet_by_name
    return self.book.sheet_by_name(name)
  File "/env/lib/python3.7/site-packages/xlrd/book.py", line 476, in sheet_by_name
    raise XLRDError('No sheet named <%r>' % sheet_name)
xlrd.biffh.XLRDError: No sheet named <'Table 3a - Hospital Confirmed'>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant