简体   繁体   English

openpyxl load_workbook() 冻结

[英]openpyxl load_workbook() freezes

I'm trying to use wb = load_workbook(filename) but either I work in Python console or call it from a script, it hangs for a while, then my laptop completely freezes.我正在尝试使用wb = load_workbook(filename)但是我在 Python 控制台中工作或从脚本中调用它,它挂起一段时间,然后我的笔记本电脑完全冻结。 I can't switch to console to reboot, can't restart X etc. (UPD: CPU consumption is 100% in this moment, memory consump. is 5% only).我无法切换到控制台重新启动,无法重新启动 X 等(UPD:此时 CPU 消耗为 100%,内存消耗仅为 5%)。 Has anybody met such issue?有没有人遇到过这样的问题?

Python 2.7, openpyxl 2.4.9 Python 2.7,openpyxl 2.4.9

The warning is exactly that, a warning about some aspect of the file being removed.警告正是这样,关于正在删除的文件的某些方面的警告。 But it has nothing to do with the rest of the question.但这与问题的其余部分无关。 I suspect you are running out of memory.我怀疑你的内存不足。 How much memory is openpyxl using when the laptop freezes?当笔记本电脑死机时,openpyxl 使用了多少内存?

I had this issue kinda.... I had been editing my excel workbook.我有这个问题有点......我一直在编辑我的excel工作簿。 I ended up accidentally pasting a space into an almost infinite amount of rows.我最终不小心将一个空格粘贴到几乎无限数量的行中。 ya know... like a lot.你知道...喜欢很多。 I selected all empty cells and hit delete, saved workbook, problem gone.我选择了所有空单元格并点击删除,保存工作簿,问题消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM