Weird stacktrace coming from manage.py test

35 views
Skip to first unread message

Jeff Heard

unread,
Mar 22, 2012, 12:34:22 PM3/22/12
to django...@googlegroups.com
Has anyone seen this before?  Am I missing something?  This hasn't even gotten to my code yet.  I'm using this in my settings.py:

TEST_RUNNER = 'django.contrib.gis.tests.GeoDjangoTestSuiteRunner'

I have a template PostGIS database setup properly.  And I'm running the stable release of Django 1.3.

---

Traceback (most recent call last):
 File "manage.py", line 14, in <module>
   execute_manager(settings)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
   utility.execute()
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
   self.fetch_command(subcommand).run_from_argv(self.argv)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
   self.execute(*args, **options.__dict__)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
   output = self.handle(*args, **options)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/core/management/commands/test.py", line 37, in handle
   failures = test_runner.run_tests(test_labels)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/test/simple.py", line 359, in run_tests
   old_config = self.setup_databases()
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/test/simple.py", line 296, in setup_databases
   test_db_name = connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/db/backends/creation.py", line 351, in create_test_db
   self._create_test_db(verbosity, autoclobber)
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/db/backends/creation.py", line 425, in _create_test_db
   self.set_autocommit()
 File "/Users/jeffersonheard/Source/geoanalytics/lib/python2.7/site-packages/django/db/backends/creation.py", line 481, in set_autocommit
   self.connection.connection.autocommit = True
psycopg2.ProgrammingError: autocommit cannot be used inside a transaction

Reinout van Rees

unread,
Mar 23, 2012, 10:47:01 AM3/23/12
to django...@googlegroups.com
On 22-03-12 17:34, Jeff Heard wrote:
> Has anyone seen this before? Am I missing something? This hasn't even
> gotten to my code yet. I'm using this in my settings.py:
>
> TEST_RUNNER = 'django.contrib.gis.tests.GeoDjangoTestSuiteRunner'
>
> I have a template PostGIS database setup properly. And I'm running the
> stable release of Django 1.3.
>
> ---
>
> Traceback (most recent call last):
...

> self.connection.connection.autocommit = True
> psycopg2.ProgrammingError: autocommit cannot be used inside a transaction

For me, this normally means the database definition is not quite right.

In your geodjango case, do you perhaps miss django.contrib.gis in your
INSTALLED_APPS list?


Reinout

--
Reinout van Rees http://reinout.vanrees.org/
rei...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"

Jeff Heard

unread,
Mar 23, 2012, 10:55:52 AM3/23/12
to django...@googlegroups.com
No, it turned out that my django-startproject.py was still the one for 1.3...

> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

Reply all
Reply to author
Forward
0 new messages