Azure Flask Web应用无法正常工作

时间:2017-08-19 00:00:51

标签: python azure flask

我正在尝试使用Flask框架部署我的Azure Web应用程序。每当我部署它时,我都会收到服务器500错误。但是,当我评论出来时

import pyodbc 

它很好。使用pyodbc库的任何想法都会使我的Web应用程序无法正常工作?

另外,如何调试以查找错误代码以帮助解决此问题? 到目前为止,我在日志文件中看到以下内容:

  

StdErr:2017-08-18 23:12:02.085000:未处理的例外情况   wfastcgi.py:Traceback(最近一次调用最后一次):文件   “D:\ Python27 \ Scripts \ wfastcgi.py”,第711行,主要内容       env,handler = read_wsgi_handler(response.physical_path)文件“D:\ Python27 \ Scripts \ wfastcgi.py”,第568行,在read_wsgi_handler中       return getv,get_wsgi_handler(handler_name)get_wsgi_handler中的文件“D:\ Python27 \ Scripts \ wfastcgi.py”,第541行       handler = handler()文件“。\ ptvs_virtualenv_proxy.py”,第98行,在get_virtualenv_handler中       handler = get_wsgi_handler(os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))文件   get_wsgi_handler中的“。\ ptvs_virtualenv_proxy.py”,第85行       引发ValueError('“%s”无法导入'%handler_name)ValueError:“rsit_tools.app”无法导入2017-08-18   23:12:02.100000:wfastcgi.py 2.1.1关闭2017-08-18 23:19:53.953000:   wfastcgi.py 2.1.1开始2017-08-18 23:19:53.969000:Python版本:   2.7.8(默认,2014年6月30日,16:03:49)[MSC v.1500 32 bit(Intel)] 2017-08-18 23:19:53.969000:wfastcgi.py 2.1.1初始化2017-08-18   23:19:54:激活virtualenv   D:\ home \ site \ wwwroot \ env \ Scripts \ activate_this.py 2017-08-18   23:19:54.031000:获取处理程序rsit_tools.app 2017-08-18   23:19:55.316000:读取WSGI处理程序时出错:

     

Traceback(最近一次调用最后一次):文件   “D:\ Python27 \ Scripts \ wfastcgi.py”,第711行,主要内容       env,handler = read_wsgi_handler(response.physical_path)文件“D:\ Python27 \ Scripts \ wfastcgi.py”,第568行,在read_wsgi_handler中       return getv,get_wsgi_handler(handler_name)get_wsgi_handler中的文件“D:\ Python27 \ Scripts \ wfastcgi.py”,第541行       handler = handler()文件“。\ ptvs_virtualenv_proxy.py”,第98行,在get_virtualenv_handler中       handler = get_wsgi_handler(os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))文件   get_wsgi_handler中的“。\ ptvs_virtualenv_proxy.py”,第85行       引发ValueError('“%s”无法导入'%handler_name)   ValueError:无法导入“rsit_tools.app”

1 个答案:

答案 0 :(得分:0)

我明白了。我有64位虚拟环境。 Azure是32位。一旦我覆盖到32位,它就能很好用。