Fresh Install - Error when executing python migrate.py

Bug #1736509 reported by Olivier Calzi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libravatar (obsolete)
New
Undecided
Unassigned

Bug Description

Hello Everyone,

I'm trying to setup a libravatar service for my firm but i have issue during the setup.

My setup source is the following url : https://git.launchpad.net/~libravatar/libravatar/tree/INSTALL.md

when i execute python manage.py migrate i get the following.

`python manage.py migrate
Operations to perform:
  Synchronize unmigrated apps: tools, account, messages, public
  Apply all migrations: contenttypes, django_openid_auth, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
    Creating table account_photo
    Creating table account_confirmedemail
    Creating table account_unconfirmedemail
    Creating table account_unconfirmedopenid
    Creating table account_confirmedopenid
    Creating table account_openidnonce
    Creating table account_openidassociation
    Running deferred SQL...
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 179, in handle
    created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 318, in sync_apps
    cursor.execute(statement)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 62, in execute
    return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "auth_user" does not exist
`
Here is my python migrate diffsettings:
`ADMINS = [('Admin', '<email address hidden>')]
ADMIN_EMAIL = '<email address hidden>' ###
ADMIN_MEDIA_PREFIX = '/media/' ###
ALLOWED_HOSTS = ['avatar.toto.fr']
AUTHENTICATION_BACKENDS = ('django_auth_ldap.backend.LDAPBackend', 'django_openid_auth.auth.OpenIDBackend', 'django.contrib.auth.backends.ModelBackend')
AUTH_LDAP_GLOBAL_OPTIONS = {17: 3, 24582: False, 20481: 7} ###
AUTH_LDAP_SERVER_URI = 'ldap://*****:389/' ###
AUTH_LDAP_USER_ATTR_MAP = {'first_name': 'givenName', 'last_name': 'sn', 'email': 'mail'} ###
AUTH_LDAP_USER_DN_TEMPLATE = 'uid=%(user)s,ou=P**********' ###
AUTH_LDAP_USER_PHOTO = 'jpegPhoto' ###
AVATAR_DEFAULT_SIZE = 80 ###
AVATAR_MAX_SIZE = 512 ###
AVATAR_MIN_SIZE = 1 ###
AVATAR_PREGENERATED_SIZES = [20, 30, 32, 40, 50, 60, 64, 80, 128, 140, 150, 312] ###
AVATAR_ROOT = '/var/www/libravatar/avatar/' ###
AVATAR_URL = 'http://cdn.avatar.toto.fr//avatar/' ###
BASE_DIR = '/var/www/libravatar' ###
CACERTS = '/etc/ssl/certs/ca-certificates.crt' ###
CDN_SYNC_DELAY = 1800 ###
CONTACT_US = 'https://wiki.libravatar.org/talk_to_us/' ###
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': False, 'NAME': 'libravatar', 'CONN_MAX_AGE': 0, 'TIME_ZONE': 'UTC', 'OPTIONS': {}, 'HOST': 'localhost', 'USER': '******', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': '************', 'PORT': ''}}
DEBUG = True
DEFAULT_FROM_EMAIL = '<email address hidden>'
DEFAULT_PHOTO = '/img/nobody.png' ###
DEV_EMAIL = '<email address hidden>' ###
DISABLE_SIGNUP = False ###
EXPORT_FILES_ROOT = '/var/www/libravatar/export/' ###
EXPORT_FILES_URL = 'https://avatar.toto.fr/export/' ###
FILE_UPLOAD_MAX_MEMORY_SIZE = 10485760
GEARMAN_SERVERS = ['localhost'] ###
GEARMAN_WORKER_LOGFILE = '/var/log/libravatar/workers.log' ###
INSTALLED_APPS = ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django_openid_auth', 'libravatar.account', 'libravatar.public', 'libravatar.tools')
JPEG_QUALITY = 85 ###
LANGUAGES = (('ca', 'Catalan'), ('cs', 'Czech'), ('de', 'German'), ('en', 'English'), ('en_GB', 'British English'), ('es', 'Spanish'), ('eu', 'Basque'), ('fr', 'French'), ('it', 'Italian'), ('ja', 'Japanese'), ('nl', 'Dutch'), ('pt_BR', 'Brazilian Portuguese'), ('ru', 'Russian'), ('sq', 'Albanian'), ('tr', 'Turkish'), ('uk', 'Ukrainian'))
LIBRAVATAR_VERSION = '0.1' ###
LOGIN_REDIRECT_URL = '/account/profile/'
LOGIN_URL = '/account/login/'
MAX_NUM_PHOTOS = 4 ###
MAX_NUM_UNCONFIRMED_EMAILS = 5 ###
MAX_PHOTO_SIZE = 10485760 ###
MEDIA_ROOT = '/var/www/libravatar/static/'
MEDIA_URL = 'http://cdn.avatar.toto.fr/'
MIDDLEWARE_CLASSES = ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')
OPENID_CREATE_USERS = True ###
PASSWORD_HASHERS = ('django.contrib.auth.hashers.BCryptSHA256PasswordHasher', 'django.contrib.auth.hashers.BCryptPasswordHasher', 'django.contrib.auth.hashers.PBKDF2PasswordHasher', 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', 'django.contrib.auth.hashers.SHA1PasswordHasher', 'django.contrib.auth.hashers.MD5PasswordHasher', 'django.contrib.auth.hashers.CryptPasswordHasher')
READY_FILES_ROOT = '/var/www/libravatar/ready/' ###
REQUIRED_DOMAIN = 'toto.fr' ###
ROOT_URLCONF = 'libravatar.urls' ###
SECRET_KEY = '+%&mv-4l5lrv^6nn9a-h4l1o2jqw_x^cf276mjz)$52aruy(g7'
SECURE_AVATAR_URL = 'https://seccdn.avatar.toto.fr//avatar/' ###
SECURE_MEDIA_URL = 'https://seccdn.avatar.toto.fr/' ###
SECURITY_URL = 'https://wiki.libravatar.org/security/' ###
SERVER_EMAIL = '<email address hidden>'
SESSION_COOKIE_SECURE = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
SETTINGS_MODULE = 'libravatar.settings' ###
SITE_NAME = 'avatar.toto.fr' ###
SITE_URL = 'https://avatar.toto.fr' ###
SUPPORT_EMAIL = '<email address hidden>' ###
TEMPLATE_CONTEXT_PROCESSORS = ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.contrib.messages.context_processors.messages', 'libravatar.context_processors.basepage')
TEMPLATE_DEBUG = True
TEMPLATE_DIRS = ('/var/www/libravatar/libravatar/templates',)
TIME_ZONE = 'UTC'
UPLOADED_FILES_ROOT = '/var/www/libravatar/uploaded/' ###
UPLOADED_FILES_URL = 'https://avatar.toto.fr/uploaded/' ###
USER_FILES_ROOT = '/var/www/libravatar/user/' ###
USER_FILES_URL = 'https://avatar.toto.fr/user/' ###
USE_L10N = True
USE_TZ = True`

May it be related that i had activate the ldap settings too soon ? I tried with the default settings only with change in the postgesql username and i still get this.

My OS is ubuntu Xenial.

Please let me know.

Revision history for this message
François Marier (fmarier) wrote :

Sorry for the delay, I haven't had time yet to reproduce your problem in an Ubuntu Xenial virtual machine.

It does look like there is a problem with our instructions though. I will try to do a full run-through again on Ubuntu to see if there's anything else that might fail.

Revision history for this message
Olivier Calzi (ocaet) wrote :

Hello François,

No worry for the delay.

Let me know the status.

Olivier Calzi (ocaet)
description: updated
Revision history for this message
Olivier Calzi (ocaet) wrote : Re: [Bug 1736509] Re: Fresh Install - Error when executing python migrate.py

Hello,

Do you have any update as i'm still looking for a viable alternative to
Gravatar.

Please let me know.

Le 09-12-17 à 18:15, François Marier a écrit :
> Sorry for the delay, I haven't had time yet to reproduce your problem in
> an Ubuntu Xenial virtual machine.
>
> It does look like there is a problem with our instructions though. I
> will try to do a full run-through again on Ubuntu to see if there's
> anything else that might fail.
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.