openspug / spug

开源运维平台:面向中小型企业设计的轻量级无Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、文件在线上传下载、应用发布部署、在线任务计划、配置中心、监控、报警等一系列功能。
https://spug.cc
GNU Affero General Public License v3.0
10.19k stars 2.06k forks source link

Docker 部署之后上传xls提示 pyexcel-xls 缺失 #4

Closed JaeGerW2016 closed 5 years ago

JaeGerW2016 commented 6 years ago

ERROR in middleware [/spug/spug_api/libs/middleware.py:40]: Please install pyexcel-xls

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functionsrule.endpoint File "/spug/spug_api/libs/decorators.py", line 28, in wrapper return func(*args, kwargs) File "/spug/spug_api/apps/assets/host.py", line 122, in host_import data = excel_parse() File "/spug/spug_api/apps/assets/utils.py", line 7, in excel_parse return dict(request.get_dict(field_name='file')) File "/usr/lib/python3.6/site-packages/pyexcel_webio/init.py", line 114, in get_dict return pe.get_dict(params) File "/usr/lib/python3.6/site-packages/pyexcel/core.py", line 141, in get_dict keywords) File "/usr/lib/python3.6/site-packages/pyexcel/core.py", line 36, in get_sheet named_content = sources.get_sheet_stream(keywords) File "/usr/lib/python3.6/site-packages/pyexcel/internal/core.py", line 20, in get_sheet_stream sheets = a_source.get_data() File "/usr/lib/python3.6/site-packages/pyexcel/plugins/sources/memory_input.py", line 38, in get_data self._keywords) File "/usr/lib/python3.6/site-packages/pyexcel/plugins/parsers/excel.py", line 25, in parse_file_content file_content, file_type=self._file_type, keywords) File "/usr/lib/python3.6/site-packages/pyexcel/plugins/parsers/excel.py", line 35, in _parse_any anything, file_type=file_type, keywords) File "/usr/lib/python3.6/site-packages/pyexcel_io/io.py", line 65, in get_data streaming=False, keywords) File "/usr/lib/python3.6/site-packages/pyexcel_io/io.py", line 83, in _get_data return load_data(**keywords) File "/usr/lib/python3.6/site-packages/pyexcel_io/io.py", line 173, in load_data reader = READERS.get_a_plugin(file_type, library) File "/usr/lib/python3.6/site-packages/pyexcel_io/plugins.py", line 77, in get_a_plugin plugin = self.load_me_now(__file_type, library=library) File "/usr/lib/python3.6/site-packages/lml/plugin.py", line 289, in load_me_now self.raise_exception(key) File "/usr/lib/python3.6/site-packages/pyexcel_io/plugins.py", line 91, in raise_exception raise exceptions.SupportingPluginAvailableButNotInstalled(message) pyexcel_io.exceptions.SupportingPluginAvailableButNotInstalled: Please install pyexcel-xls

zyupo commented 6 years ago

Please install pyexcel-xls 感谢你的反馈,requerements.txt 可能少写了一个包,手动安装一下pyexcel-xls 安装包。