在Django中使用SQLite3时出现“NULL result without error in PyObject_Call”错误。
查了很长时间,今天终于找到了答案:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues
Python 'pysqlite' Symbol Conflict
Certain versions of 'pysqlite' module defined a global symbol 'cache_init'. This symbol clashes with a similarly named symbol present in the Apache mod_cache module. As a result of the clash, the two modules being loaded at the same time can cause the Apache process to crash or the following Python exception to be raised:
SystemError: NULL result without error in PyObject_Call
This problem is mentioned in pysqlite ticket #174 and the release notes for version 2.3.3 of pysqlite To avoid the problem upgrade to pysqlite 2.3.3 or later.
解决方法:
wget http://pysqlite.googlecode.com/files/pysqlite-2.6.3.tar.gz
tar zxvf pysqlite-2.6.3.tar.gz
cd pysqlite-2.6.3
python setup.py install
service httpd restart
问题解决。
如何仍有问题,可以尝试不用sqlite3模块,换用其它模块来操作SQLite。
try:
import pysqlite2.dbapi2 as sqlite3
except ImportError:
import sqlite3
呵呵,谢谢
VaTG790i.最好的<a href=http://www.kyfei.com>网站推广软件</a>,
非常好
....................
;ui;普i;uighur;ui;ui;个
在unix网络编程中看到了关于TCP/IP的一些内容,我感觉还是写的不够。正在下载中,一定
下载地址呢