我正在使用python3.7标准环境创建AppEngine应用程序。该应用程序在本地可以正常运行,但在上载时在浏览器中抛出500错误,显示为:
for (int i = 0; i < 9; i++) {
binaryNum[i] = inputtedNumber % 2;
inputtedNumber = inputtedNumber/2;
}
return binaryNum;
未为python3.7启用调试(在查看调试器时会告诉我)。而且日志条目中没有针对500响应的错误消息提示。
如何继续调试并了解应用程序发生了什么?
我应该注意,我正在尝试使用Selenium Webdriver运行无头chrome,但我不是100%确信它与此环境兼容,我只是想尝试一下。
根据建议添加日志
"Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."
答案 0 :(得分:0)
In order to debug this further I inserted a try/catch block like so:
try: {application code} except Exception as e: return str(e)
This lands the top level error message in the browser when the application fails.