This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou
Date 2013-05-18.17:05:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
After installing Django, I get the following error in test_pydoc:

FAIL: test_url_requests (test.test_pydoc.PydocUrlHandlerTest)
Traceback (most recent call last):
  File "/home/antoine/cpython/finalize/Lib/test/", line 581, in test_url_requests
    self.assertEqual(result, title, text)
AssertionError: 'Pydoc: Error - search?key=pydoc' != 'Pydoc: Search Results'
- Pydoc: Error - search?key=pydoc
+ Pydoc: Search Results

The reason is attempting to import a django.something module raises the following error:

django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings

... which isn't silenced by pydoc.

Now I agree this is fundamentally obnoxious on Django's part, but unfortunately it isn't the only package (IIRC) to behave in this way, meaning it would be nice from pydoc to silence all such errors when an import is attempted.
Date User Action Args
2013-05-18 17:05:19pitrousetrecipients: + pitrou
2013-05-18 17:05:19pitrousetmessageid: <>
2013-05-18 17:05:19pitroulinkissue18010 messages
2013-05-18 17:05:18pitroucreate