我用fastCGI设置了IIS,提供一个烧瓶应用程序。到现在为止,一直都还不错。接下来,我希望添加一些数据库连接,因此我将import cx_Oracle行添加到我的应用程序中。现在抛出这个错误:Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 791, in main
env, handler = read_wsgi_handler(response.physical_path)
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler
handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 616, in get_wsgi_handler
raise ValueError('"%s" could not be imported%s' % (handler_name, last_tb))
ValueError: "Bloomberg_server.app" could not be imported:
Traceback (most recent call last):
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 600, in get_wsgi_handler
handler = __import__(module_name, fromlist=[name_list[0][0]])
File "D:\website\init__.py", line 6, in import cx_Oracle
ImportError: DLL load failed: The specified module could not be found. StdOut: StdErr:
正如标题所暗示的,我无法在受控环境中重现这个问题。同样的import语句在conda环境中工作得很好,而且,对于依赖数据库连接的页面,我可以很好地运行Flask调试服务器。在
我不知所措。谁知道这里发生了什么事?path/oracle_home变量指向instant client,我只安装了一个python环境。在