1
我想读从Python中的INI文件,和我下面的脚本上来:的urllib错误500个本地工作
import webapp2
import urllib
import ConfigParser
class MainPage(webapp2.RequestHandler):
def get(self):
getstreet = self.request.get('street')
getlocation = self.request.get('location')
self.response.headers['Content-Type'] = 'text/plain'
map = ConfigParser.RawConfigParser()
map.read('Map.ini')
coords = map.get(getlocation, getstreet)
self.response.out.write(coords)
app = webapp2.WSGIApplication([('/map', MainPage)],
debug=True)
从外面我只需要阅读:
xxx.appspot.com/地图位置= mylocation &街道= mystreet
我仔细检查了该INI文件上传和可用:
xxx.appspot.com/Map.ini
它本地工作得很好,但在部署时,我得到一个错误。
我见过提到url提取,但我可以找到的所有例子都是相反的
任何想法?
更多信息,没错它工作的感谢!我之前并没有真正明白这一点,无论如何,它出现在代码中时都会被上传。完全删除它从app.yaml:] – lemo 2012-07-05 10:44:18
@ user1503382随时upvote并接受答案:) – 2012-07-05 11:29:49