Trying to run a pytest with the latest PyCharm Professional release (2017.1.1) causes an internal error.
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/main.py", line 98, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/main.py", line 133, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/main.py", line 154, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR> return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
INTERNALERROR> return call_outcome.get_result()
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 280, in get_result
INTERNALERROR> _reraise(*ex) # noqa
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR> self.result = func()
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol
INTERNALERROR> runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/runner.py", line 73, in runtestprotocol
INTERNALERROR> rep = call_and_report(item, "setup", log)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/runner.py", line 137, in call_and_report
INTERNALERROR> hook.pytest_runtest_logreport(report=report)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/Library/Python/2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/Applications/PyCharm.app/Contents/helpers/pycharm/teamcity/pytest_plugin.py", line 234, in pytest_runtest_logreport
INTERNALERROR> self.teamcity.blockClosed(block_name, flowId=test_id)
INTERNALERROR> File "/Applications/PyCharm.app/Contents/helpers/pycharm/_jb_runner_tools.py", line 215, in blockClosed
INTERNALERROR> if self._latest_subtest_result == "Failure":
INTERNALERROR> AttributeError: 'NewTeamcityServiceMessages' object has no attribute '_latest_subtest_result'
This happens for every pytest.
pip list:
appdirs (1.4.0)
Appium-Python-Client (0.24)
argh (0.26.2)
backports-abc (0.5)
backports.ssl-match-hostname (3.5.0.1)
blinker (1.4)
brotlipy (0.6.0)
certifi (2017.1.23)
cffi (1.10.0)
click (6.7)
ConfigArgParse (0.11.0)
construct (2.5.3)
cssutils (1.0.2)
EditorConfig (0.12.1)
enum34 (1.1.6)
Flask (0.11.1)
h2 (2.4.4)
hpack (2.3.0)
html2text (2016.9.19)
hyperframe (4.0.2)
idna (2.5)
ipaddress (1.0.18)
itsdangerous (0.24)
Jinja2 (2.9.5)
jsbeautifier (1.6.12)
lxml (3.6.0)
MarkupSafe (1.0)
mitmproxy (0.18.3)
packaging (16.8)
passlib (1.6.5)
pathtools (0.1.2)
Pillow (3.4.2)
pip (9.0.1)
pyasn1 (0.1.9)
pycparser (2.17)
pyparsing (2.1.10)
pyperclip (1.5.27)
pytz (2016.10)
PyYAML (3.12)
requests (2.13.0)
selenium (3.0.2)
setuptools (34.1.1)
singledispatch (3.4.0.3)
six (1.10.0)
tornado (4.4.2)
typing (3.5.2.2)
urwid (1.3.1)
watchdog (0.8.3)
Werkzeug (0.12.1)
wheel (0.29.0)
zope.interface (4.3.3)
Pytest version: This is pytest version 3.0.6, imported from /Library/Python/2.7/site-packages/pytest.pyc
OS: macOS Sierra, 10.12.4
That's not a bug in pytest, please report to pycharm
Yeah - just downgraded and saw it was still using the same pytest version. I'll report there.
Upstream PyCharm bug: https://youtrack.jetbrains.com/issue/PY-23673
The latest version of PyCharm fixes this issue. I updated and the problem went away.
Yes, this is fixed as of build 171.4346.
Although the latest version I'm getting via EAP Updates is 171.4249.17. :(
thanks for the updates
@julianwachholz I updated to that same EAP build and it still resolved the issue.
PyCharm 2017.1.2 has been released, and fixes this for me. :+1:
Most helpful comment
Yes, this is fixed as of build 171.4346.
Although the latest version I'm getting via EAP Updates is 171.4249.17. :(