当我尝试在Windows上运行pytest时,这就是我得到的。
有什么想法吗?
在谷歌找不到任何东西。
也许,这是32/64位或缺少包的问题?
第一次真的看到此错误,似乎ctypes存在问题。
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\py.test.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\_pytest\config.py", line 47, in main
config = _prepareconfig(args, plugins)
File "C:\Python27\lib\site-packages\_pytest\config.py", line 132, in _preparec
onfig
pluginmanager=pluginmanager, args=args)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
724, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
338, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
333, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
595, in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
249, in _wrapped_call
wrap_controller.send(call_outcome)
File "C:\Python27\lib\site-packages\_pytest\helpconfig.py", line 32, in pytest
_cmdline_parse
config = outcome.get_result()
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
279, in get_result
_reraise(*ex) # noqa
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
264, in __init__
self.result = func()
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
596, in execute
res = hook_impl.function(*args)
File "C:\Python27\lib\site-packages\_pytest\config.py", line 880, in pytest_cm
dline_parse
self.parse(args)
File "C:\Python27\lib\site-packages\_pytest\config.py", line 1030, in parse
self._preparse(args, addopts=addopts)
File "C:\Python27\lib\site-packages\_pytest\config.py", line 1001, in _prepars
e
args=args, parser=self._parser)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
724, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
338, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
333, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
595, in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
File "C:\Python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line
244, in _wrapped_call
next(wrap_controller) # first yield
File "C:\Python27\lib\site-packages\_pytest\capture.py", line 35, in pytest_lo
ad_initial_conftests
_readline_workaround()
File "C:\Python27\lib\site-packages\_pytest\capture.py", line 481, in _readlin
e_workaround
import readline # noqa
File "C:\Python27\lib\site-packages\readline.py", line 6, in <module>
from pyreadline.rlmain import Readline
File "C:\Python27\lib\site-packages\pyreadline\__init__.py", line 17, in <modu
le>
from . import unicode_helper, logger, clipboard, lineeditor, modes, console
File "C:\Python27\lib\site-packages\pyreadline\console\__init__.py", line 15,
in <module>
from .console import *
File "C:\Python27\lib\site-packages\pyreadline\console\console.py", line 177,
in <module>
L[name] = func = getattr(k32, name)
File "C:\Python27\lib\ctypes\__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "C:\Python27\lib\ctypes\__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'GetConsoleScreenBufferInfoEx' not found