加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

ASP脚本中的Python 500服务器错误

发布时间:2020-12-16 04:30:34 所属栏目:asp.Net 来源:网络整理
导读:以下asp脚本给出了错误:“HTTP / 1.1 500服务器错误” %@ Language = Python%%def main(): Response.Write("My first ASP script!")main()% 当我在IIS 7.5 Windows 7(64位)上运行它时.在错误日志中,它只是提到ASP_0147错误. 我在服务器上安装了Python 3.2和
以下asp脚本给出了错误:“HTTP / 1.1 500服务器错误”
<%@ Language = Python%>
<%
def main():
    Response.Write("My first ASP script!")
main()
%>

当我在IIS 7.5 Windows 7(64位)上运行它时.在错误日志中,它只是提到ASP_0147错误.

我在服务器上安装了Python 3.2和Active Python 3.2.2.3,并通过pyscript.py注册了Python

我为服务器启用了32位应用程序.我还安装了Python for Windows,看看是否有帮助.

你能建议我怎么解决这个问题吗?

更新:

我已经设法让python3正常工作,但我必须注册–debug,如下所示:

C:Python32Libsite-packageswin32comextaxscriptclient>c:Python32python.exe
 pyscript.py --debug
Requesting elevation and retrying...
Registered: Python (for debugging)

为什么它只能在调试模式下工作?在这种模式下运行是否安全?

这是启用调试时的跟踪:

Object with win32trace dispatcher created (object=None)
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-SetScriptSite(<PyIActiveScriptSite at 0x00000000036923B0 with obj at 0x000000000056FFD8>,) [1,None]
Debugging extensions (axdebug) module does not exist - debugging is disabled.. 
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._QueryInterface_ with unsupported IID IActiveScriptProperty ({4954E0D0-FBC7-11D1-8410-006008C3FBFC})
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-InitNew() [1,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-GetScriptDispatch(None,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._QueryInterface_ with unsupported IID {1D044690-8923-11D0-ABD2-00A0C911E8B2} ({1D044690-8923-11D0-ABD2-00A0C911E8B2})
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('Response',66) [1,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('Request',None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('Server',None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('Session',None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('Application',None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('ObjectContext',None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('ASPGLOBALTLB',74) [1,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-ParseScriptText('def main():rn    Response.Write("My first ASP script!")rnmain()rn',None,'STRIP EMBEDDED HTML COMMENTS',1,192,0) [1,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-AddNamedItem('ScriptingNamespace',10) [1,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-SetScriptState(1,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-SetScriptState(0,None]
in <win32com.axscript.client.pyscript.PyScript object at 0x00000000035946A0>._InvokeEx_-Close() [1,None]

谢谢,

巴里

解决方法

可能不是合适的解决方案,过去我遇到过这个问题. 最近的activepython版本似乎因活动脚本而中断. 我只能使用版本2.5.6.10. 如果版本不重要,您可以尝试旧版本.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读