Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'ExcelReader' from 'openpyxl.reader.excel' #457

Closed
shmilylty opened this issue Feb 16, 2020 · 1 comment
Closed
Labels

Comments

@shmilylty
Copy link

tablib [required: >=0.11.4, installed: 1.1.0]
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)]

Traceback (most recent call last):
  File ".\oneforall.py", line 213, in <module>
    fire.Fire(OneForAll)
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\fire\core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\fire\core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\fire\core.py", line 675, in _CallAndUpdateTrace component = fn(*varargs, **kwargs)
  File ".\oneforall.py", line 199, in run
    self.main()
  File ".\oneforall.py", line 177, in main
  File "E:\OneForAll\oneforall\dbexport.py", line 47, in export
    data = rows.export(format)
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\records.py", line 167, in export
    return self.dataset.export(format, **kwargs)
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\tablib\core.py", line 431, in export
    fmt = registry.get_format(format)
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\tablib\formats\__init__.py", line 131, in get_format
    self._formats[key] = load_format_class(self._formats[key])
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\tablib\formats\__init__.py", line 29, in load_format_class
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\tablib\formats\_xlsx.py", line 7, in <module> from openpyxl.reader.excel import ExcelReader, load_workbook
ImportError: cannot import name 'ExcelReader' from 'openpyxl.reader.excel' (C:\Users\test\.virtualenvs\OneForAll-sCn0jn-q\lib\site-packages\openpyxl\reader\excel.py)
@claudep
Copy link
Contributor

claudep commented Feb 16, 2020

Thanks for the report. It looks like openpyxl.reader.excel.ExcelReader is only available from openpyxl >= 2.6.0. You should be able to solve your issue by upgrading your openpyxl version. I'll fix the minimal openpyxl requirement in setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants