我正在關注Web Development(cs253)www.udacity.com,並且突然開始出現錯誤:這是我第一次使用web開發。爲什麼我會通過Google App Engine的教程獲取服務器錯誤?
在Google App Engine網站上成功地遵循「hello world」教程(正如Udacity上的視頻課程所建議的)之後,我開始進行小的更改,並不斷重新提交新的修改版本,直到4或5次後開始收到以下錯誤:
Error: Server Error
The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it.
我試圖(1)等待一段時間,然後重新嘗試,(2)重新加載最新版本,(3)重新加載已知的工作立即以前的版本,(4)清潔瞭解Chrome的歷史(我正在運行MacOS Lion版本10.7.5) - >沒有。我仍然遇到同樣的錯誤。
任何想法我做錯了什麼?謝謝:任何幫助歡迎!
最後一件事:我使用Python 2.7(不知道它的問題,但仍。)
PS:這裏是代碼:
helloworld.py
import webapp2
form="
<form action="http://www.google.com/search">
<input name="q">
<input type="submit">
</form>
"""
class MainPage(webapp2.RequestHandler):
def get(self):
# self.response.headers['Content-Type'] = 'text/html'
# self.response.out.write('Hello, Udacity!!')
self.response.out.write(form)
app = webapp2.WSGIApplication([('/', MainPage)], debug=True)
app.yaml
application: chris73it-helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.app
那個就是它:只有2個文件。
問題解決:編輯代碼時,3個雙引號中的2個已經消失:現在它可以工作。不幸的是,因爲這是我的SO的第一個職位,我不準「給予+1分」 :-(我們對此深感抱歉!
你可以分享你的代碼嗎? –