Issue #10 new

AttributeError: 'module' object has no attribute '__path__'

Jeff Bauer
created an issue

Just a quick traceback dump before I forget to submit a bug ticket. ;-)

I'm running this as a non-app:
{{{./ test }}}

{{{ Traceback (most recent call last): File "", line 11, in <module> execute_manager(settings) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django/core/management/", line 438, in execute_manager utility.execute() File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django/core/management/", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django/core/management/", line 191, in run_from_argv self.execute(*args, options.__dict__) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django/core/management/", line 220, in execute output = self.handle(*args, options) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django/core/management/commands/", line 37, in handle failures = test_runner.run_tests(test_labels) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django_coverage/", line 90, in run_tests settings.COVERAGE_PATH_EXCLUDES) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django_coverage/utils/module_tools/", line 133, in get_all_modules _get_all_modules(pkg_name, pkg, blacklist) File "/home/jbauer/.virtualenvs/py272/lib/python2.7/site-packages/django_coverage/utils/module_tools/", line 112, in _get_all_modules for p in pkg.path: AttributeError: 'module' object has no attribute 'path' }}}

Comments (3)

  1. Arjen Verstoep

    I had the same problem. Turns out I had an (old, empty) directory with the same name as a Python package (permissions/,[c]). The directory didn't contain a, so I'm not sure why it was identified as a package.

    Deleting the directory fixed the problem, but improving package detection code would be better of course.

  2. Log in to comment