项目使用的是oracle数据库,用的是cx_oralce模块 启动时看到如下异常抛出
[Thu Jul 10 16:40:54.915311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] mod_wsgi (pid=28224): Exception occurred processing WSGI script ‘D:/spiders/dj_spiders/dj_spiders/wsgi.py‘. [Thu Jul 10 16:40:54.915311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] Traceback (most recent call last): [Thu Jul 10 16:40:54.916311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\core\\handlers\\wsgi.py", line 187, in __call__ [Thu Jul 10 16:40:54.919311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] self.load_middleware() [Thu Jul 10 16:40:54.919311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\core\\handlers\\base.py", line 49, in load_middleware [Thu Jul 10 16:40:54.920311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] mw_instance = mw_class() [Thu Jul 10 16:40:54.920311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\middleware\\transaction.py", line 18, in __init__ [Thu Jul 10 16:40:54.920311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] if connection.settings_dict[‘ATOMIC_REQUESTS‘]: [Thu Jul 10 16:40:54.920311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\db\\__init__.py", line 34, in __getattr__ [Thu Jul 10 16:40:54.925311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] return getattr(connections[DEFAULT_DB_ALIAS], item) [Thu Jul 10 16:40:54.925311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\db\\utils.py", line 198, in __getitem__ [Thu Jul 10 16:40:54.925311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] backend = load_backend(db[‘ENGINE‘]) [Thu Jul 10 16:40:54.925311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\db\\utils.py", line 113, in load_backend [Thu Jul 10 16:40:54.925311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] return import_module(‘%s.base‘ % backend_name) [Thu Jul 10 16:40:54.925311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\utils\\importlib.py", line 40, in import_module [Thu Jul 10 16:40:54.929311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] __import__(name) [Thu Jul 10 16:40:54.929311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] File "C:\\Python27\\lib\\site-packages\\django-1.6.2-py2.7.egg\\django\\db\\backends\\oracle\\base.py", line 45, in <module> [Thu Jul 10 16:40:54.929311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e) [Thu Jul 10 16:40:54.929311 2014] [:error] [pid 28224:tid 752] [client ::1:61859] UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xd5 in position 17: ordinal not in range(128)
少年,重装下cx_Oracle 可解决
windows奇葩的django+ mod_wsgi 下 cx_Oracle奇怪的问题,布布扣,bubuko.com
windows奇葩的django+ mod_wsgi 下 cx_Oracle奇怪的问题
原文:http://my.oschina.net/u/557892/blog/289447