Create a gist now

Instantly share code, notes, and snippets.

Error running django-haystack tests when importing function from importlib in haystack.utils
$ python setup.py test
running test
Searching for Django
Best match: Django 1.8
Processing Django-1.8-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/Django-1.8-py2.7.egg
Searching for coverage
Best match: coverage 4.0a5
Processing coverage-4.0a5-py2.7-macosx-10.10-x86_64.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/coverage-4.0a5-py2.7-macosx-10.10-x86_64.egg
Searching for mock
Best match: mock 1.0.1
Processing mock-1.0.1-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/mock-1.0.1-py2.7.egg
Searching for nose
Best match: nose 1.3.6
Processing nose-1.3.6-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/nose-1.3.6-py2.7.egg
Searching for geopy==0.95.1
Best match: geopy 0.95.1
Processing geopy-0.95.1-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/geopy-0.95.1-py2.7.egg
Searching for python-dateutil
Best match: python-dateutil 2.4.2
Processing python_dateutil-2.4.2-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/python_dateutil-2.4.2-py2.7.egg
Searching for lxml==3.2.3
Best match: lxml 3.2.3
Processing lxml-3.2.3-py2.7-macosx-10.10-x86_64.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/lxml-3.2.3-py2.7-macosx-10.10-x86_64.egg
Searching for whoosh==2.5.4
Best match: Whoosh 2.5.4
Processing Whoosh-2.5.4-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/Whoosh-2.5.4-py2.7.egg
Searching for pysolr>=3.2.0
Best match: pysolr 3.3.0
Processing pysolr-3.3.0-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/pysolr-3.3.0-py2.7.egg
Searching for elasticsearch<2.0.0,>=1.0.0
Best match: elasticsearch 1.4.0
Processing elasticsearch-1.4.0-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/elasticsearch-1.4.0-py2.7.egg
Searching for requests>=2.0
Best match: requests 2.6.0
Processing requests-2.6.0-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/requests-2.6.0-py2.7.egg
Searching for urllib3<2.0,>=1.8
Best match: urllib3 1.10.2
Processing urllib3-1.10.2-py2.7.egg
Using /Users/benspaulding/dev/django-haystack/.eggs/urllib3-1.10.2-py2.7.egg
running egg_info
writing requirements to django_haystack.egg-info/requires.txt
writing django_haystack.egg-info/PKG-INFO
writing top-level names to django_haystack.egg-info/top_level.txt
writing dependency_links to django_haystack.egg-info/dependency_links.txt
reading manifest file 'django_haystack.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'django_haystack.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "setup.py", line 68, in <module>
test_suite="test_haystack.run_tests.run_all",
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/benspaulding/.virtualenvs/django-haystack/lib/python2.7/site-packages/setuptools/command/test.py", line 142, in run
self.with_project_on_sys_path(self.run_tests)
File "/Users/benspaulding/.virtualenvs/django-haystack/lib/python2.7/site-packages/setuptools/command/test.py", line 122, in with_project_on_sys_path
func()
File "/Users/benspaulding/.virtualenvs/django-haystack/lib/python2.7/site-packages/setuptools/command/test.py", line 163, in run_tests
testRunner=self._resolve_as_ep(self.test_runner),
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "/Users/benspaulding/dev/django-haystack/test_haystack/__init__.py", line 14, in <module>
django.setup()
File "/Users/benspaulding/dev/django-haystack/.eggs/Django-1.8-py2.7.egg/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/benspaulding/dev/django-haystack/.eggs/Django-1.8-py2.7.egg/django/apps/registry.py", line 78, in populate
raise RuntimeError("populate() isn't reentrant")
RuntimeError: populate() isn't reentrant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment