I am working on a small pet project. Everything seemed fine until I committed all my work to a git repository and cloned it in a new location.
I have set up a new virtual environment with all the modules I am using and here my surprise: I am not able to run anything. For example when I try to run the test cases I'm getting deprecation warning and an error (see the output below).
Does somebody have an idea?
python manage.py test
api
api.urls
/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/jsonview/decorators.py:10: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module
/Users/nutrina/temp/appointment/appointment/appointment/api/models.py:7: RemovedInDjango19Warning: Model class api.models.UserProfile doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class UserProfile(models.Model):
/Users/nutrina/temp/appointment/appointment/appointment/api/models.py:11: RemovedInDjango19Warning: Model class api.models.Office doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class Office(models.Model):
/Users/nutrina/temp/appointment/appointment/appointment/api/models.py:43: RemovedInDjango19Warning: Model class api.models.OfficeSchedule doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class OfficeSchedule(models.Model):
Creating test database for alias 'default'...
Got an error creating the test database: database "test_appointment" already exists
Type 'yes' if you would like to try deleting the test database 'test_appointment', or 'no' to cancel: yes
Destroying old test database 'default'...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/nutrina/.virtualenvs/appointment_2/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 "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/test/runner.py", line 210, in run_tests
old_config = self.setup_databases()
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/test/runner.py", line 166, in setup_databases
**kwargs
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/test/runner.py", line 370, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/db/backends/base/creation.py", line 368, in create_test_db
test_flush=True,
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command
return command.execute(*args, **defaults)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 179, in handle
created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 317, in sync_apps
cursor.execute(statement)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/nutrina/.virtualenvs/appointment_2/lib/python2.7/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "auth_group" does not exist