{"action":"closed","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/995","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/995/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/995/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/995/events","html_url":"https://github.com/pytest-dev/pytest/issues/995","id":106149263,"number":995,"title":"[master] AttributeError in `filter_traceback`: 'str' object has no attribute 'relto'","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pytest-dev/pytest/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/pytest-dev/pytest/labels/reporting","name":"reporting","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pytest-dev/pytest/milestones/5","html_url":"https://github.com/pytest-dev/pytest/milestones/2.8.2","labels_url":"https://api.github.com/repos/pytest-dev/pytest/milestones/5/labels","id":1325498,"number":5,"title":"2.8.2","description":"","creator":{"login":"RonnyPfannschmidt","id":156838,"avatar_url":"https://avatars.githubusercontent.com/u/156838?v=3","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":2,"state":"open","created_at":"2015-09-27T08:23:15Z","updated_at":"2015-10-01T04:00:41Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-09-12T11:25:50Z","updated_at":"2015-10-01T04:00:41Z","closed_at":"2015-10-01T04:00:41Z","body":"I am seeing the following error suddenly:\r\n\r\n    INTERNALERROR>   File \"…/pytest/_pytest/python.py\", line 36, in filter_traceback\r\n    INTERNALERROR>     return entry.path != cutdir1 and not entry.path.relto(cutdir2)\r\n    INTERNALERROR> AttributeError: 'str' object has no attribute 'relto'\r\n\r\nNormally `entry.path` is of type `<class 'py._path.local.LocalPath'>`, but in this case it is not.\r\n\r\n    > …/pytest/_pytest/python.py(39)filter_traceback()\r\n         38         import ipdb; ipdb.set_trace()\r\n    ---> 39     return entry.path != cutdir1 and not entry.path.relto(cutdir2)\r\n         40 \r\n\r\n    ipdb> entry.path\r\n    '<frozen importlib._bootstrap>'\r\n    ipdb> cutdir1\r\n    local('…/pyenv/project/lib/python3.4/site-packages/pluggy.py')\r\n    ipdb> cutdir2\r\n    local('…/pytest/_pytest')\r\n\r\n\r\n\r\nFull traceback:\r\n\r\n    Traceback (most recent call last):\r\n      File \"…/pytest/_pytest/main.py\", line 90, in wrap_session\r\n        doit(config, session)\r\n      File \"…/pytest/_pytest/main.py\", line 125, in _main\r\n        config.hook.pytest_runtestloop(session=session)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 724, in __call__\r\n        return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 338, in _hookexec\r\n        return self._inner_hookexec(hook, methods, kwargs)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 333, in <lambda>\r\n        _MultiCall(methods, kwargs, hook.spec_opts).execute()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 596, in execute\r\n        res = hook_impl.function(*args)\r\n      File \"…/pytest/_pytest/main.py\", line 145, in pytest_runtestloop\r\n        item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 724, in __call__\r\n        return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 338, in _hookexec\r\n        return self._inner_hookexec(hook, methods, kwargs)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 333, in <lambda>\r\n        _MultiCall(methods, kwargs, hook.spec_opts).execute()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 595, in execute\r\n        return _wrapped_call(hook_impl.function(*args), self.execute)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 253, in _wrapped_call\r\n        return call_outcome.get_result()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 278, in get_result\r\n        raise ex[1].with_traceback(ex[2])\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 264, in __init__\r\n        self.result = func()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 596, in execute\r\n        res = hook_impl.function(*args)\r\n      File \"…/pytest/_pytest/runner.py\", line 67, in pytest_runtest_protocol\r\n        runtestprotocol(item, nextitem=nextitem)\r\n      File \"…/pytest/_pytest/runner.py\", line 74, in runtestprotocol\r\n        rep = call_and_report(item, \"setup\", log)\r\n      File \"…/pytest/_pytest/runner.py\", line 123, in call_and_report\r\n        report = hook.pytest_runtest_makereport(item=item, call=call)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 724, in __call__\r\n        return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 338, in _hookexec\r\n        return self._inner_hookexec(hook, methods, kwargs)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 333, in <lambda>\r\n        _MultiCall(methods, kwargs, hook.spec_opts).execute()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 595, in execute\r\n        return _wrapped_call(hook_impl.function(*args), self.execute)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 249, in _wrapped_call\r\n        wrap_controller.send(call_outcome)\r\n      File \"…/pytest/_pytest/skipping.py\", line 170, in pytest_runtest_makereport\r\n        rep = outcome.get_result()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 278, in get_result\r\n        raise ex[1].with_traceback(ex[2])\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 264, in __init__\r\n        self.result = func()\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/pluggy.py\", line 596, in execute\r\n        res = hook_impl.function(*args)\r\n      File \"…/pytest/_pytest/runner.py\", line 229, in pytest_runtest_makereport\r\n        style=item.config.option.tbstyle)\r\n      File \"…/pytest/_pytest/python.py\", line 695, in _repr_failure_py\r\n        style=style)\r\n      File \"…/pytest/_pytest/main.py\", line 396, in _repr_failure_py\r\n        self._prunetraceback(excinfo)\r\n      File \"…/pytest/_pytest/python.py\", line 678, in _prunetraceback\r\n        ntraceback = ntraceback.filter(filter_traceback)\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/py/_code/code.py\", line 299, in filter\r\n        return Traceback(filter(fn, self))\r\n      File \"…/pyenv/project/lib/python3.4/site-packages/py/_code/code.py\", line 260, in __init__\r\n        list.__init__(self, tb)\r\n      File \"…/pytest/_pytest/python.py\", line 36, in filter_traceback\r\n        return entry.path != cutdir1 and not entry.path.relto(cutdir2)\r\n    AttributeError: 'str' object has no attribute 'relto'\r\n"}}