Skip to content

AttributeError: 'Module' object has no attribute '_obj' #1944

Closed
@axil

Description

@axil

pytest generates an exception which is hard to understand:

% uname -a
Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt4-3 (2015-02-03) x86_64 GNU/Linux

% cat test.py
def f():
    return

assert f() == 10

% pytest test.py
platform linux -- Python 3.4.2, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
___________________________ ERROR collecting test.py _____________________________
env/lib/python3.4/site-packages/_pytest/python.py:209: in fget
    return self._obj
E   AttributeError: 'Module' object has no attribute '_obj'

Seems to be the same issue as mentioned here:
pytest-dev/pytest-django#386

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions