I Use python2.6+apache2.2+mod_wsgi window2003, when i import adodbapi
module on an wsgi script, will told me error such as:
File "C:\Python26\lib\site-packages\adodbapi\adodbapi.py", line 298, in
connect
raise InterfaceError #Probably COM Error
InterfaceError
Then i annotate some code on adodbapi.py, it's tell me another error:
File "C:\Python26\lib\site-packages\adodbapi\adodbapi.py", line 69, in
<module>
import pythoncom
File "C:\Python26\lib\site-packages\pythoncom.py", line 2, in
<module>
import pywintypes
File "C:\Python26\lib\site-packages\win32\lib\pywintypes.py", line 124,
in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "C:\Python26\lib\site-packages\win32\lib\pywintypes.py", line 64, in
__import_pywin32_system_module__
import _win32sysloader
ImportError: DLL load faile.
My test wsgi code is like this:
def application(environ, start_response): </span>
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
import adodbapi
constr='Provider=SQLOLEDB.1; Persist Security Info=True; Data
Source=%s; user ID=%s; Password=%s; Initial Catalog=%s;' % \
('127.0.0.1','sa','test','test')
conn = adodbapi.connect(constr)
conn.close()
start_response(status, response_headers)
return [output]
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.