Note that there are some explanatory texts on larger screens.

plurals
  1. POAttributeError: 'DatabaseWrapper' object has no attribute 'Database'
    primarykey
    data
    text
    <p>Version numbers are Django 1.6, Python 3.3.2 and Mac OS X 10.9</p> <p>I create an app with this command</p> <pre><code> python3 manage.py startapp lists </code></pre> <p>Then in my lists/tests.py file I put this code</p> <pre><code>from django.test import TestCase class SmokeTest(TestCase): def test_bad_maths(self): self.assertEqual(1 + 1, 3) </code></pre> <p>then I run this command from the app root folder</p> <pre><code>python3 manage.py test </code></pre> <p>and this is the stack trace that comes back, it's not working correctly</p> <pre><code> E ====================================================================== ERROR: test_bad_maths (lists.tests.SmokeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 124, in ensure_connection self.connect() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 111, in connect conn_params = self.get_connection_params() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 85, in get_connection_params raise NotImplementedError NotImplementedError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 653, in supports_transactions self.connection.enter_transaction_management() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 288, in enter_transaction_management if managed == self.get_autocommit(): File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 324, in get_autocommit self.ensure_connection() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 124, in ensure_connection self.connect() File "/usr/local/lib/python3.3/site-packages/django/db/utils.py", line 86, in __exit__ db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__) AttributeError: 'DatabaseWrapper' object has no attribute 'Database' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 124, in ensure_connection self.connect() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 111, in connect conn_params = self.get_connection_params() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 85, in get_connection_params raise NotImplementedError NotImplementedError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.3/site-packages/django/test/testcases.py", line 178, in __call__ self._pre_setup() File "/usr/local/lib/python3.3/site-packages/django/test/testcases.py", line 749, in _pre_setup self._fixture_setup() File "/usr/local/lib/python3.3/site-packages/django/test/testcases.py", line 861, in _fixture_setup if not connections_support_transactions(): File "/usr/local/lib/python3.3/site-packages/django/test/testcases.py", line 848, in connections_support_transactions for conn in connections.all()) File "/usr/local/lib/python3.3/site-packages/django/test/testcases.py", line 848, in &lt;genexpr&gt; for conn in connections.all()) File "/usr/local/lib/python3.3/site-packages/django/utils/functional.py", line 49, in __get__ res = instance.__dict__[self.func.__name__] = self.func(instance) File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 664, in supports_transactions self.connection.leave_transaction_management() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 317, in leave_transaction_management if managed == self.get_autocommit(): File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 324, in get_autocommit self.ensure_connection() File "/usr/local/lib/python3.3/site-packages/django/db/backends/__init__.py", line 124, in ensure_connection self.connect() File "/usr/local/lib/python3.3/site-packages/django/db/utils.py", line 86, in __exit__ db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__) AttributeError: 'DatabaseWrapper' object has no attribute 'Database' ---------------------------------------------------------------------- Ran 0 tests in 0.031s FAILED (errors=1) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload