I want to use Locust as a library in Django's Unittest framework, because I want Django (3.1.2) to create a temporary database for me to do the testing. However, I receive the following error:
Traceback (most recent call last):
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/django_test_manage.py", line 104, in handle
failures = TestRunner(test_labels, **options)
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/django_test_runner.py", line 254, in run_tests
return DjangoTeamcityTestRunner(**options).run_tests(test_labels,
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/django_test_runner.py", line 156, in run_tests
return super(DjangoTeamcityTestRunner, self).run_tests(test_labels, extra_tests, **kwargs)
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/test/runner.py", line 695, in run_tests
old_config = self.setup_databases(aliases=databases)
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/test/runner.py", line 614, in setup_databases
return _setup_databases(
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/test/utils.py", line 170, in setup_databases
connection.creation.create_test_db(
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/db/backends/base/creation.py", line 57, in create_test_db
self.connection.close()
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 285, in close
self.validate_thread_sharing()
File "/Users/PycharmProjects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 552, in validate_thread_sharing
raise DatabaseError(
django.db.utils.DatabaseError: DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 4487204352 and this is thread id 4528855696.
I don't seem to be able to even import Locust, for example, the following test_locust.py, which does nothing, can already reproduce the error:
from django.test import TransactionTestCase
from locust.env import Environment
class MyTestCase(TransactionTestCase):
def test_cart(self):
pass
Related
Not sure where to start.
I just want Jenkins to run tests via python manage.py test
In my VirtualEnv build step I run migrations after installing necessary packages. I then try to run python manage.py test which cannot complete.
Output:
[...]
Applying auth.0012_alter_user_first_name_max_length... OK
Applying users.0001_initial... OK
Applying admin.0001_initial... OK
[...]
Part of Traceback (starting # test command):
+ python manage.py test
/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/environ/environ.py:628: UserWarning: /var/lib/jenkins/workspace/New_Performance_Realm/speedrealm/.env doesn't exist - if you're not configuring your environment separately, create one.
warnings.warn(
Creating test database for alias 'default'...
Traceback (most recent call last):
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 421, in execute
return Database.Cursor.execute(self, query)
sqlite3.OperationalError: no such table: users_user
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/commands/test.py", line 23, in run_from_argv
super().run_from_argv(argv)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/commands/test.py", line 55, in handle
failures = test_runner.run_tests(test_labels)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/test/runner.py", line 725, in run_tests
old_config = self.setup_databases(aliases=databases)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/test/runner.py", line 643, in setup_databases
return _setup_databases(
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/test/utils.py", line 179, in setup_databases
connection.creation.create_test_db(
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/base/creation.py", line 74, in create_test_db
call_command(
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/__init__.py", line 181, in call_command
return command.execute(*args, **defaults)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 214, in handle
self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 353, in sync_apps
self.stdout.write(' Running deferred SQL...')
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/sqlite3/schema.py", line 35, in __exit__
self.connection.check_constraints()
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 371, in check_constraints
cursor.execute(
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/var/lib/jenkins/shiningpanda/jobs/1d61c5c6/virtualenvs/d41d8cd9/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 421, in execute
return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: no such table: users_user
Build step 'Virtualenv Builder' marked build as failure
Finished: FAILURE
Following the traceback it appears its a sqlite3 error which is what the test db instance is.
I looked at the test db and verified a users_user table has been created. Why is Jenkins giving me this error? I also use MySQL but I get a permission denied error.
This all works locally btw, deleteing the db, re-creating, running migrations, and running the test.
As of now, I found there were multiple errors but seemed hidden. I ran one test at a time and the first test had an actual failure. I can update this when I edit all of the tests, to verify if this is indeed the problem.
I am trying to run django's test suite for my application with two databases: one using postgres and the other using POSTGIS. Here is my DATABASES configuration:
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
...},
'POSTGIS': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
...}
When I run python manage.py test app I am prompted to delete an old test database, and when I say yes I get the following error:
Destroying old test database for alias 'default'...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/test/runner.py", line 532, in run_tests
old_config = self.setup_databases()
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/test/runner.py", line 482, in setup_databases
self.parallel, **kwargs
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/test/runner.py", line 726, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 70, in create_test_db
run_syncdb=True,
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/__init__.py", line 119, in call_command
return command.execute(*args, **defaults)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 172, in handle
self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 285, in sync_apps
editor.create_model(model)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 235, in create_model
definition, extra_params = self.column_sql(model, field)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 134, in column_sql
db_params = field.db_parameters(connection=self.connection)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 636, in db_parameters
type_string = self.db_type(connection)
File "/home/ubuntu/yes/lib/python2.7/site-packages/django/contrib/gis/db/models/fields.py", line 120, in db_type
return connection.ops.geo_db_type(self)
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'
Which version of Django are you using?
When you made the database changes, prior to anything else, did you use the appropriate command to update the databases and relationships to them, i.e., syncdb or migrate?
Answering those two questions will help diagnose the problem. Thanks!
$ python manage.py test homepage.shortlistedlist
When i run above django rest framework testcase file, i met below error, kindly help me to solve this problem,
(py3.4)testuser#testuser-To:~/projects/testfile/testfile$ python manage.py test homepage.compareproperties --settings=testfile.settings.test
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/commands/test.py", line 50, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/commands/test.py", line 71, in execute
super(Command, self).execute(*args, **options)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/core/management/commands/test.py", line 88, in handle
failures = test_runner.run_tests(test_labels)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/test/runner.py", line 146, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/home/testuser/envs/testfile/lib/python3.4/site-packages/django/test/runner.py", line 95, in build_suite
tests = self.test_loader.discover(start_dir=label, **kwargs)
File "/usr/lib/python3.4/unittest/loader.py", line 255, in discover
self._get_directory_containing_module(top_part)
File "/usr/lib/python3.4/unittest/loader.py", line 269, in _get_directory_containing_module
full_path = os.path.abspath(module.__file__)
AttributeError: 'module' object has no attribute '__file__'
Thanks In Advance,
I was able to solve this by adding an empty __init__.py to the root of my project.
I think the clue is the get_directory_containing_module() call - without __init__.py, it doesn't see the directory as a module.
I'm running tests with nose and would like to take advantage of the --failed flag. But as soon as I add it I get errors like these for user related models:
./manage.py test # works
./manage.py test --failed # fails
CommandError: One or more models did not validate:
vod.video: 'user' has a relation with model accounts.CustomUser, which has either not been installed or is abstract.
Packages:
Django==1.6.7
django-nose==1.3
nose==1.3.4
What am I doing wrong?
Update: I don't see the issue on my master branch. In the new branch I'm started to use the TenantTestCase class from django-tenant-schemas. May be the cause of the problem.
The traceback I get:
./manage.py test --failed --traceback
nosetests --failed --verbosity=1
Creating test database for alias 'default'...
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/commands/test.py", line 50, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/commands/test.py", line 71, in execute
super(Command, self).execute(*args, **options)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/home/dev/envs/py26/lib/python2.6/site-packages/south/management/commands/test.py", line 8, in handle
super(Command, self).handle(*args, **kwargs)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/commands/test.py", line 88, in handle
failures = test_runner.run_tests(test_labels)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django_nose/runner.py", line 218, in run_tests
result = self.run_suite(nose_argv)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django_nose/runner.py", line 165, in run_suite
addplugins=plugins_to_add)
File "/home/dev/envs/py26/lib/python2.6/site-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/usr/lib/python2.6/unittest.py", line 817, in __init__
self.runTests()
File "/home/dev/envs/py26/lib/python2.6/site-packages/nose/core.py", line 207, in runTests
result = self.testRunner.run(self.test)
File "/home/dev/envs/py26/lib/python2.6/site-packages/nose/core.py", line 50, in run
wrapper = self.config.plugins.prepareTest(test)
File "/home/dev/envs/py26/lib/python2.6/site-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/home/dev/envs/py26/lib/python2.6/site-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django_nose/plugin.py", line 76, in prepareTest
self.old_names = self.runner.setup_databases()
File "/home/dev/envs/py26/lib/python2.6/site-packages/django_nose/runner.py", line 401, in setup_databases
return super(NoseTestSuiteRunner, self).setup_databases()
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/test/runner.py", line 107, in setup_databases
return setup_databases(self.verbosity, self.interactive, **kwargs)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/test/runner.py", line 279, in setup_databases
verbosity, autoclobber=not interactive)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/db/backends/creation.py", line 339, in create_test_db
load_initial_data=False)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/__init__.py", line 159, in call_command
return klass.execute(*args, **defaults)
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/base.py", line 284, in execute
self.validate()
File "/home/dev/envs/py26/lib/python2.6/site-packages/django/core/management/base.py", line 314, in validate
raise CommandError("One or more models did not validate:\n%s" % error_text)
django.core.management.base.CommandError: One or more models did not validate:
vod.video: 'user' has a relation with model accounts.CustomUser, which has either not been installed or is abstract.
I think it has to do with the custom user model. Check this out https://github.com/bernardopires/django-tenant-schemas/issues/237
I'm using unittest2 together with manage.py test, and before it even seems to run any tests, it spews a horrid database error, as below. I'm in my development environment (actually on a dreamhost server for a variety of reasons), using sqlite as my database.
Even when I copy my app out of where it is for production (and edit settings.py accordingly), I still get the same error (even though it should no longer be addressing the same database file as the dev environment).
Update: Even moving all instances of my database files to a different filename still leaves me with the same error. This leads me to believe that the test environment is somehow looking at a bogus database, or something very odd is happening.
[graffias]$ python manage.py test
Creating test database for alias 'default'...
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "/home/marcintustin/django/Django-1.3/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/marcintustin/django/Django-1.3/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/marcintustin/django/Django-1.3/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/marcintustin/django/Django-1.3/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/management/commands/test.py", line 8, in handle
super(Command, self).handle(*args, **kwargs)
File "/home/marcintustin/django/Django-1.3/django/core/management/commands/test.py", line 37, in handle
failures = test_runner.run_tests(test_labels)
File "/home/marcintustin/django/Django-1.3/django/test/simple.py", line 359, in run_tests
old_config = self.setup_databases()
File "/home/marcintustin/django/Django-1.3/django/test/simple.py", line 296, in setup_databases
test_db_name = connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
File "/home/marcintustin/django/Django-1.3/django/db/backends/creation.py", line 366, in create_test_db
load_initial_data=False)
File "/home/marcintustin/django/Django-1.3/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/home/marcintustin/django/Django-1.3/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/marcintustin/django/Django-1.3/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/management/commands/syncdb.py", line 99, in handle_noargs
management.call_command('migrate', **options)
File "/home/marcintustin/django/Django-1.3/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/home/marcintustin/django/Django-1.3/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/management/commands/migrate.py", line 105, in handle
ignore_ghosts = ignore_ghosts,
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/migration/__init__.py", line 191, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/migration/migrators.py", line 221, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/migration/migrators.py", line 298, in migrate_many
interactive=self.interactive)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/db/generic.py", line 808, in send_pending_create_signals
interactive=interactive)
File "/home/marcintustin/django/South-0.7.3-py2.5.egg/south/db/generic.py", line 855, in really_send_create_signal
db=self.db_alias,
File "/home/marcintustin/django/Django-1.3/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/marcintustin/django/Django-1.3/django/contrib/auth/management/__init__.py", line 30, in create_permissions
ctype = ContentType.objects.get_for_model(klass)
File "/home/marcintustin/django/Django-1.3/django/contrib/contenttypes/models.py", line 38, in get_for_model
defaults = {'name': smart_unicode(opts.verbose_name_raw)},
File "/home/marcintustin/django/Django-1.3/django/db/models/manager.py", line 135, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/home/marcintustin/django/Django-1.3/django/db/models/query.py", line 385, in get_or_create
obj.save(force_insert=True, using=self.db)
File "/home/marcintustin/django/Django-1.3/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/marcintustin/django/Django-1.3/django/db/models/base.py", line 560, in save_base
transaction.commit_unless_managed(using=using)
File "/home/marcintustin/django/Django-1.3/django/db/transaction.py", line 124, in commit_unless_managed
connection.commit_unless_managed()
File "/home/marcintustin/django/Django-1.3/django/db/backends/__init__.py", line 183, in commit_unless_managed
self._commit()
File "/home/marcintustin/django/Django-1.3/django/db/backends/__init__.py", line 46, in _commit
return self.connection.commit()
pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress
Basically, I have no idea where to start with fixing this. Any ideas?