django-backup-old icon indicating copy to clipboard operation
django-backup-old copied to clipboard

NameError: global name 'CommandError' is not defined

Open ebertti opened this issue 12 years ago • 2 comments

this is my database configuration:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'schemaname',
        'USER': 'user',
        'PASSWORD': 'pass',
        'HOST': '',
        'PORT': '',
    }
}

and this is the exception:

raise CommandError('Backup in %s engine not implemented' % self.engine)
NameError: global name 'CommandError' is not defined

when I print self.engine to debug, I get this value:

django.db.backends.mysql

SO: Windows 8 Python 2.7.4 Django: 1.4.3

ebertti avatar Sep 01 '13 21:09 ebertti

Odd. On line 233 what is the value of CommandError and self.engine ?

andybak avatar Sep 05 '13 10:09 andybak

self.engine -> django.db.backends.mysql

CommandError -> global name 'CommandError' is not defined

ebertti avatar Sep 05 '13 18:09 ebertti