Closed GoogleCodeExporter closed 8 years ago
Please post more details about your setup (what's the version on Django, and the
revision of django-pyodbc, etc. etc.), this would help us to understand what
you've
done and why you have a 'django-pyodbc' module in you Python module path.
Reopen this ticket only if you are willing to post that information.
Original comment by cra...@gmail.com
on 21 Apr 2009 at 10:42
I have this same problem. All latest versions: Python 2.6, Django version
1.1.1,
django-pyodbc taken off svn an hour ago. Platform is Windows XP. I followed the
django-pyodbc install instructions, including adding it to my PYTHONPATH. Clean
new
django project, only file edited is settings.py as follows:
DATABASE_ENGINE = 'sql_server.pyodbc'
DATABASE_NAME = 'MyDBName'
DATABASE_HOST = 'localhost\MySQLInstanceName'
DATABASE_OPTIONS = {
'driver': 'SQL Native Client',
'MARS_Connection': True,
}
Trying to start the dev server produces following output:
python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at 0x00CF6970>
Traceback (most recent call last):
File "c:\python26\lib\site-packages\django\core\management\commands\runserver.
py", line 48, in inner_run
self.validate(display_num_errors=True)
File "c:\python26\lib\site-packages\django\core\management\base.py", line 249,
in validate
num_errors = get_validation_errors(s, app)
File "c:\python26\lib\site-packages\django\core\management\validation.py", lin
e 22, in get_validation_errors
from django.db import models, connection
File "c:\python26\lib\site-packages\django\db\__init__.py", line 41, in <modul
e>
backend = load_backend(settings.DATABASE_ENGINE)
File "c:\python26\lib\site-packages\django\db\__init__.py", line 37, in load_b
ackend
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'sql_server.pyodbc' isn't an availa
ble database backend. Available options are: 'dummy', 'mysql', 'oracle', 'postgr
esql', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named sql_server.pyodbc.base
Original comment by SeanFro...@gmail.com
on 16 Oct 2009 at 6:54
I'm having the same problem and can't seem find much data on the problem
(google, etc). My setup is a fresh install of Ubuntu,
FreeTDS, etc.
DATABASE_ENGINE = 'sql_server.pyodbc' # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'hhchammond' # Or path to database file if using
sqlite3.
DATABASE_USER = 'mee444' # Not used with sqlite3.
DATABASE_PASSWORD = 'pass4you' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used
with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with
sqlite3.
DATABASE_OPTIONS = {'driver':'FreeTDS', 'dsn':'SOFTAID',}
This is pretty much per the instructions.
The error is:
Error was: No module named sql_server.pyodbc.base
Yet I can of course my pydobc connections thru 'normal' python scripts using
pyodbc...
Original comment by l.lensg...@gmail.com
on 20 Nov 2009 at 8:14
Original issue reported on code.google.com by
malatm...@gmail.com
on 21 Apr 2009 at 6:57