Zombie process running xlwings

匿名 (未验证) 提交于 2019-12-03 01:26:01

问题:

I get a python error when attempting to use xlwings. Just importing xlwings seems to be sufficient to trigger the problem.

Lewis-MacBook-Air:~ lewis$ python Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, Oct 19 2015, 18:31:17)  [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://anaconda.org >>> import xlwings >>> xlwings.__version__ '0.6.0' >>> exit() Error in atexit._run_exitfuncs: Traceback (most recent call last):   File "/Users/lewis/anaconda/lib/python2.7/atexit.py", line 24, in _run_exitfuncs     func(*targs, **kargs)   File "/Users/lewis/anaconda/lib/python2.7/site-packages/xlwings/_xlmac.py", line 47, in clean_up     if is_excel_running():   File "/Users/lewis/anaconda/lib/python2.7/site-packages/xlwings/_xlmac.py", line 98, in is_excel_running     if proc.name() == 'Microsoft Excel':   File "/Users/lewis/anaconda/lib/python2.7/site-packages/psutil/__init__.py", line 539, in name     cmdline = self.cmdline()   File "/Users/lewis/anaconda/lib/python2.7/site-packages/psutil/__init__.py", line 592, in cmdline     return self._proc.cmdline()   File "/Users/lewis/anaconda/lib/python2.7/site-packages/psutil/_psosx.py", line 209, in wrapper     raise ZombieProcess(self.pid, self._name, self._ppid) ZombieProcess: psutil.ZombieProcess process still exists but it's a zombie (pid=71) Error in sys.exitfunc: Traceback (most recent call last):   File "/Users/lewis/anaconda/lib/python2.7/atexit.py", line 24, in _run_exitfuncs     func(*targs, **kargs)   File "/Users/lewis/anaconda/lib/python2.7/site-packages/xlwings/_xlmac.py", line 47, in clean_up     if is_excel_running():   File "/Users/lewis/anaconda/lib/python2.7/site-packages/xlwings/_xlmac.py", line 98, in is_excel_running     if proc.name() == 'Microsoft Excel':   File "/Users/lewis/anaconda/lib/python2.7/site-packages/psutil/__init__.py", line 539, in name     cmdline = self.cmdline()   File "/Users/lewis/anaconda/lib/python2.7/site-packages/psutil/__init__.py", line 592, in cmdline     return self._proc.cmdline()   File "/Users/lewis/anaconda/lib/python2.7/site-packages/psutil/_psosx.py", line 209, in wrapper     raise ZombieProcess(self.pid, self._name, self._ppid) psutil.ZombieProcess: psutil.ZombieProcess process still exists but it's a zombie (pid=71) Lewis-MacBook-Air:~ lewis$  

Calling python from Excel using Workbook.caller() is working fine.

I am running El Capitan 10.11.2 (Beta 5).

Any advice appreciated.

回答1:

It seems that the version 3.3.0 of psutil is causing this, as logged here.

At the moment, downgrading to pip install psutil==3.2.2 should help until this is fixed.

update: This has been fixed with v0.6.1



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!