Skip to content

AttributeError: '_io.FileIO' object has no attribute 'errors' #555

@pytestbot

Description

@pytestbot

Originally reported by: Jason R. Coombs (BitBucket: jaraco, GitHub: jaraco)


New in pytest 2.6.0, many setuptools tests are failing thus: https://travis-ci.org/jaraco/setuptools/jobs/31453603

In particular, the error occurs with this traceback:

c:\python\lib\distutils\log.py:44: in info
    self._log(INFO, msg, args)
c:\python\lib\distutils\log.py:30: in _log
    if stream.errors == 'strict':
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.capture.EncodedFile object at 0x0000000005C87128>
name = 'errors'

    def __getattr__(self, name):
>       return getattr(self.buffer, name)
E       AttributeError: '_io.FileIO' object has no attribute 'errors'

c:\python\lib\site-packages\pytest-2.6.0-py3.4.egg\_pytest\capture.py:242: AttributeError

Using Python 2.x or pytest 2.5.x works around the issue.


Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions