Re: Test runner fails with Django 1.2.1 and psycopg2 2.4.2
do you get these errors with: 'OPTIONS': { 'autocommit': True, } ? On Jun 14, 6:06 pm, Andrew Brookins wrote: > Hey, > > Yesterday I started seeing test runner failures with Django 1.2.1 and > psycog2 2.4.2. > > Here's the traceback (where [project_dir] is the path to my virtualenv): > > Traceback (most recent call last): > File "./manage.py", line 11, in > execute_manager(settings) > File > "[project_dir]/lib/python2.6/site-packages/django/core/management/__init__. > py", > line 438, in execute_manager > utility.execute() > File > "[project_dir]/lib/python2.6/site-packages/django/core/management/__init__. > py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "[project_dir]/lib/python2.6/site-packages/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "[project_dir]/lib/python2.6/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "[project_dir]/lib/python2.6/site-packages/django/core/management/commands/ > test.py", > line 37, in handle > failures = test_runner.run_tests(test_labels) > File "[project_dir]/lib/python2.6/site-packages/django/test/simple.py", > line 313, in run_tests > old_config = self.setup_databases() > File "[project_dir]/lib/python2.6/site-packages/django/test/simple.py", > line 270, in setup_databases > connection.creation.create_test_db(self.verbosity, autoclobber=not > self.interactive) > File > "[project_dir]/lib/python2.6/site-packages/django/db/backends/creation.py", > line 346, in create_test_db > test_database_name = self._create_test_db(verbosity, autoclobber) > File > "[project_dir]/lib/python2.6/site-packages/django/db/backends/creation.py", > line 381, in _create_test_db > self.set_autocommit() > File > "[project_dir]/lib/python2.6/site-packages/django/db/backends/creation.py", > line 448, in set_autocommit > self.connection.connection.autocommit = True > psycopg2.ProgrammingError: autocommit cannot be used inside a transaction > > Reverting to psycopg2 2.4.1 fixes the problem. Anyone seen this? > > Best, > Andrew -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Test runner fails with Django 1.2.1 and psycopg2 2.4.2
Looks like there's already a ticket (my search-fu failed me): https://code.djangoproject.com/ticket/16250 Andrew -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7D7CrjiJaXMJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Test runner fails with Django 1.2.1 and psycopg2 2.4.2
Hey, Yesterday I started seeing test runner failures with Django 1.2.1 and psycog2 2.4.2. Here's the traceback (where [project_dir] is the path to my virtualenv): Traceback (most recent call last): File "./manage.py", line 11, in execute_manager(settings) File "[project_dir]/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "[project_dir]/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "[project_dir]/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "[project_dir]/lib/python2.6/site-packages/django/core/management/base.py", line 218, in execute output = self.handle(*args, **options) File "[project_dir]/lib/python2.6/site-packages/django/core/management/commands/test.py", line 37, in handle failures = test_runner.run_tests(test_labels) File "[project_dir]/lib/python2.6/site-packages/django/test/simple.py", line 313, in run_tests old_config = self.setup_databases() File "[project_dir]/lib/python2.6/site-packages/django/test/simple.py", line 270, in setup_databases connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive) File "[project_dir]/lib/python2.6/site-packages/django/db/backends/creation.py", line 346, in create_test_db test_database_name = self._create_test_db(verbosity, autoclobber) File "[project_dir]/lib/python2.6/site-packages/django/db/backends/creation.py", line 381, in _create_test_db self.set_autocommit() File "[project_dir]/lib/python2.6/site-packages/django/db/backends/creation.py", line 448, in set_autocommit self.connection.connection.autocommit = True psycopg2.ProgrammingError: autocommit cannot be used inside a transaction Reverting to psycopg2 2.4.1 fixes the problem. Anyone seen this? Best, Andrew -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/bYngn9hESksJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.