【发布时间】:2012-04-18 07:35:45
【问题描述】:
我是 Python 新手,正在尝试使用 Django 快速构建网站。
以下是我执行的步骤(Win 7):
- 已安装 Python 2.7
- 已安装 Django 1.4
- 创建了一个项目和应用程序
- 使用“
python manage.py startserver”启动服务器并使用基本页面“http://127.0.0.1:8000”访问。 - 现在想为我的项目配置我的 Oracle 11g 数据库。因此,安装了
cx_Oracle 5.1-11g并尝试了 'python manage.py syncdb',但失败并出现 cx_Oracle.DatabaseError: ORA-24315: 非法属性类型。 -
即使是从 python 解释器也得到了同样的错误。
import cx_Oracle connection=cx_Oracle.Connection('python_user','python_user','(DESC..string..)')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cx_Oracle.DatabaseError: ORA-24315: illegal attribute type
- 根据我的故障排除,我正在使用正确的凭据和库。
任何帮助表示赞赏..
【问题讨论】:
标签: django oracle11g database-connection python-2.7