У меня есть проект Python 2.7, который использует Django 1.2 и google-appengine
. Для запуска файла набираю python main.py
. При этом я получаю следующую ошибку. Я не знаком ни с google-appengine
, ни с Django, чтобы знать, почему я получаю эту ошибку. Также у проекта есть папка с именем lib
, в которой есть папка с именем appengine
. Я пытался установить путь к этой папке, но, похоже, ничего не делает.
Traceback (most recent call last):
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webapp2.py", line 1595, in handle_exception
return handler(request, response, e)
File "/home/vicktree/Desktop/noah/web/noahs-app/handlers/hoptoad_handler.py", line 82, in handle_500_error
notify_hoptoad(exception, request, False, False)
File "/home/vicktree/Desktop/noah/web/noahs-app/handlers/hoptoad_handler.py", line 76, in notify_hoptoad
send_to_hoptoad(generate_xml(exn, request, debug_mode), use_ssl)
File "/home/vicktree/Desktop/noah/web/noahs-app/handlers/hoptoad_handler.py", line 34, in generate_xml
xml << ('url', request.url)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webob/request.py", line 495, in url
url = self.path_url
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webob/request.py", line 467, in path_url
bpath_info = bytes_(self.path_info, self.url_encoding)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webob/descriptors.py", line 70, in fget
return req.encget(key, encattr=encattr)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webob/request.py", line 153, in encget
raise KeyError(key)
KeyError: 'PATH_INFO'
ERROR:root:'REQUEST_METHOD'
Traceback (most recent call last):
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webapp2.py", line 1546, in __call__
return response(environ, start_response)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webob/exc.py", line 358, in __call__
is_head = environ['REQUEST_METHOD'] == 'HEAD'
KeyError: 'REQUEST_METHOD'
Traceback (most recent call last):
File "main.py", line 1426, in <module>
main()
File "main.py", line 1423, in main
run_wsgi_app(application)
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/ext/webapp/util.py", line 101, in run_wsgi_app
run_bare_wsgi_app(add_wsgi_middleware(application))
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/ext/webapp/util.py", line 119, in run_bare_wsgi_app
result = application(env, _start_response)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webapp2.py", line 1548, in __call__
return self._internal_error(e)(environ, start_response)
File "/home/vicktree/.local/share/virtualenvs/noahs-app-M81YxnJh/local/lib/python2.7/site-packages/webob/exc.py", line 358, in __call__
is_head = environ['REQUEST_METHOD'] == 'HEAD'
KeyError: 'REQUEST_METHOD'
Мои вопросы:
Использую ли я неправильную версию google-appengine
(версия = 272.0.0)?
Что конкретно вызывает ошибку. Я не понимаю, что означает REQUEST_METHOD
Спасибо за ваше время.