这个话题的这一部分已经解决了,请看我对这个话题的最后一个回答。我在使用pyexcel模块保存字典时遇到了问题。
我用pip3 install pyexcel安装了pyxecel模块。
所以我有一本字典,我是这样做的:
import pyexcel as pe
myDict = {...}
pe.save_as(dict = myDict, dest_file_name = "dest_file.xls")在我的终端中,当我编译代码时,它会打印myDict,但就在我完成以下操作之后:
Otherwise unrecognized parameters were given.我在寻找一个解决方案,它可能与以下内容相关:https://pyexcel-io.readthedocs.io/en/latest/pyinstaller.html,但我不知道如何在我的代码或终端中使用--hiden-import?当我在我的代码中使用它时,我有一个语法错误。
有没有人能帮帮我?提前谢谢你。
编辑:使用pe.save_as(adict = myDict, dest_file_name = "dest_file.xls")解决问题。
发布于 2020-02-27 06:45:25
失败的原因是方法调用save_as()不接受名为dict的参数。根据文档,提供字典应该通过adict或with_keys参数来完成:
pe.save_as(adict = myDict, dest_file_name = "dest_file.xls")https://stackoverflow.com/questions/60423084
复制相似问题