#35 closed defect (invalid)
django-admin.py init problem for postgresql 8.0.3/win32
Reported by: | JZ | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.0 |
Severity: | blocker | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I try to pas step by step from http://www.djangoproject.com/documentation/tutorial1/ using PostgreSQL 8.0.3 (Winddows XP Pro SP2, Python 2.4.1, Apache 2.0.54, SVN version of django).
I cannot initialize default django tables:
C:\opt\Python24\Lib\site-packages\myproject>django-admin.py init
Traceback (most recent call last):
File "C:\opt\Python24\Scripts\django-admin.py", line 4, in ? pkg_resources.run_script('django==1.0.0', 'django-admin.py')
File "C:\opt\Python24\Lib\site-packages\setuptools-0.5a12-py2.4.egg\pkg_resources.py", line 111, in run_script require(dist_spec)[0].metadata.run_script(script_name, ns)
File "C:\opt\Python24\Lib\site-packages\setuptools-0.5a12-py2.4.egg\pkg_resources.py", line 634, in run_script execfile(script_filename, namespace, namespace)
File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\EGG-INFO\scripts\django-admin.py", line 399, in ? init()
File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\EGG-INFO\scripts\django-admin.py", line 275, in init from django.core import db, meta
File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\init.py", line 18, in ? dbmod = import('django.core.db.backends.%s' % DATABASE_ENGINE, , , [])
File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\backends\postgresql.py", line 65, in ? Database.register_type(Database.new_type((1082,), "DATE", typecasts.typecast_date))
AttributeError: 'module' object has no attribute 'register_type'
Change History (4)
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
comment:4 by , 19 years ago
To be specific: for PostgreSQL 8.x psycog v1.18 should be used (binary version for win32: http://www.stickpeople.com/projects/python/psycopg/) Also eGenix mxBASE should be installed http://www.egenix.com/files/python/eGenix-mx-Extensions.html#Download-mxBASE.
From discussion in IRC it seems you're using a version of psycopg2. Marking invalid; psycopg1 is all that's supported for now.