wmjie / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Error when setting up ibm_db_django on Windows Server 2003 R2 #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed the prerequisite software. The sanity test as described here 
(http://code.google.com/p/ibm-db/wiki/ibm_db_README) works correctly.
2. Following the django tutorial, created a test app which comes up if the 
ENGINE is set to dummy.
3. Now I change the settings to (XYZ - is the corresponding value of my db)
DATABASES = {
    'default': {
        'ENGINE': 'ibm_db_django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'XYZ',                      # Or path to database file if using sqlite3.
        'USER': 'XYZ',                      # Not used with sqlite3.
        'PASSWORD': 'XYZ',                  # Not used with sqlite3.
        'HOST': 'XYZ',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': 'XYZ',                      # Set to empty string for default. Not used with sqlite3.
    }
}

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.redirects',
    'django.contrib.comments',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    #'django.contrib.admindocs',
)

What is the expected output? What do you see instead?
Expect the test to run fine. But I see this error -

H:\>python manage.py test
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\core\management\__init__.py", line 443,
in execute_from_command_line
    utility.execute()
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\core\management\__init__.py", line 382,
in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\core\management\__init__.py", line 261,
in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\core\management\__init__.py", line 69, i
n load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\utils\importlib.py", line 35, in import_
module
    __import__(name)
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\core\management\commands\test.py", line
7, in <module>
    from django.test.utils import get_runner
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\test\__init__.py", line 5, in <module>
    from django.test.client import Client, RequestFactory
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\test\client.py", line 21, in <module>
    from django.test import signals
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\test\signals.py", line 2, in <module>
    from django.db import connections
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\db\__init__.py", line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\db\__init__.py", line 34, in __getattr__

    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "h:\python\site-packages\django-1.4-py2.5.egg\django\db\utils.py", line 93, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File "H:\PYTHON\site-packages\ibm_db_django-1.0.3-py2.5.egg\ibm_db_django\base.py", line 102, in _
_init__
  File "H:\PYTHON\site-packages\ibm_db_django-1.0.3-py2.5.egg\ibm_db_django\operations.py", line 28,
 in __init__
TypeError: __init__() takes exactly 2 arguments (1 given)

What version of the product are you using? On what operating system?
- Python 2.5.2
- ibm_db-1.0.5-py2.5-win32.egg
- ibm_db_django-1.0.3-py2.5.egg
- django-1.4-py2.5.egg
- Windows Server 2003 R2

Original issue reported on code.google.com by vgo...@gmail.com on 13 May 2012 at 1:20

GoogleCodeExporter commented 9 years ago
You get this error because Django-1.4.x is not supported by ibm_db_django-1.0.3 
you can download and use a alpha version of ibm_db_django-1.0.4a from 
http://code.google.com/p/ibm-db/downloads/detail?name=ibm_db_django-1.0.4a.tar.g
z&can=2&q= .

Very soon we are going to release ibm_db_django-1.0.4 with Django-1.4.x support.

Original comment by rahul.pr...@in.ibm.com on 14 May 2012 at 8:58

GoogleCodeExporter commented 9 years ago
Django-1.4.x supported version of ibm_db_django(1.0.4) has been released.

Please try with the newly released version of ibm_db_django and let us know how 
it goes for you.

Original comment by rahul.pr...@in.ibm.com on 16 May 2012 at 11:54

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 16 May 2012 at 11:54

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 18 Jun 2012 at 11:45