尝试访问localhost时出现HTTP错误500 [英] HTTP Error 500 when attempting to access localhost

查看:536
本文介绍了尝试访问localhost时出现HTTP错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用Google App Engine为一个班级构建了自己的第一个网络应用程序",并且已正确部署,并且在Google的服务器上运行良好.但是,当我尝试在localhost上访问它时,出现500错误:

I just built my first "web app" for a class using Google App Engine, and it deployed correctly, and works perfectly well on Google's servers. However, when I try to access it on localhost, I get a 500 error:

服务器错误",该网站在检索 http://localhost:8081/时遇到错误.该网站可能已关闭进行维护或配置不正确."

"Server error The website encountered an error while retrieving http://localhost:8081/. It may be down for maintenance or configured incorrectly."

我尝试使用各种端口,但它们似乎都不起作用.我100%肯定我使用的端口正确,并且该应用程序实际上在运行时没有错误.

I have tried using various ports, and none of them seem to work. I am 100% positive I am using the correct port and that the app is actually running with no errors.

我在Mac OS 10.6.8上使用Google Chrome和Python 2.7.2

I am using Google Chrome and Python 2.7.2 on Mac OS 10.6.8

关于如何更正此问题或要检查哪些配置的任何想法?

Any ideas on how to correct this or what configurations to check?

推荐答案

结果是,问题是GAE正在我的计算机上访问旧版本的python.

Turns out, the issue was that GAE was accessing an older version of python on my computer.

我能够通过以下方法解决此问题:打开python启动器,从解释器"复制路径,然后将其粘贴到偏好设置/Python路径"下的GAE中.就我而言,正确的路径是/usr/local/bin/pythonw

I was able to fix this by opening up the python launcher, copying the path from "Interpreter", and pasting it into GAE under Preferences/Python Path. In my case, the correct path is /usr/local/bin/pythonw

请注意,由于此处没有确定"或应用"按钮,因此必须按Enter键以应用路径更改.

It is important to note that as there is no "ok" or "apply" button here, you must hit enter to apply the path change.

这篇关于尝试访问localhost时出现HTTP错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆