GAE用のアプリケーションを開発中で、タスクキューを使用しようとしています。現在のところ、GAE App Launcherを使用してWindowsボックスで実行しているだけですが、何かをエンキューしようとすると、開発サーバーがクラッシュし、ログには厄介な出力がいっぱいです。Google App Engineのタスクキュー - 厄介なエラー
taskqueue.add(url='/processWork', params={'key', myModel.key()})
私はので、私は仕事が正常に待ち行列に入れられているかなり確信している他の作業との取引でこれを実行してみました。
はしかし、その後すぐに開発サーバーがクラッシュし、ログには、このようなものがいっぱいです:
ERROR 2011-02-06 17:04:23,289
__init__.py:395] global name 'true' is not defined Traceback (most recent call last): File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 517, in __call__
handler.post(*groups) File "C:\Projects\GAE\MyApp\main.py", line 114, in post
activity.approved = true NameError: global name 'true' is not defined INFO 2011-02-06 17:04:23,309 dev_appserver.py:3317] "POST /processWork HTTP/1.1" 500 - WARNING 2011-02-06 17:04:23,309 taskqueue_stub.py:586] Task named "task1" on queue "default" failed with code 500; will retry in 30 seconds Traceback (most recent call last): File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address) File "C:\Python27\lib\SocketServer.py", line 311, in process_request
self.shutdown_request(request) File "C:\Python27\lib\SocketServer.py", line 459, in shutdown_request
request.shutdown(socket.SHUT_WR) AttributeError: 'FakeConnection' object has no attribute 'shutdown' ERROR 2011-02-06 17:04:23,312 dev_appserver_main.py:494] Error encountered: Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 488, in main
http_server.serve_forever()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3947, in serve_forever
self.handle_request()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3913, in handle_request
self._handle_request_noblock()
File "C:\Python27\lib\SocketServer.py", line 287, in _handle_request_noblock
self.shutdown_request(request)
File "C:\Python27\lib\SocketServer.py", line 459, in shutdown_request
request.shutdown(socket.SHUT_WR) AttributeError: 'FakeConnection' object has no attribute 'shutdown' Now terminating.
---------------------------------------- Exception happened during processing of request from ('0.1.0.2', 80)
---------------------------------------- 2011-02-06 09:04:23 (Process exited with code 1)
謝罪 - 以下の応答が(真の、真実ではない)タイプミスを見つけました。しかし、これは元々の問題を解決しようとするとうまくいく。私はタイプミスを修正した場合は、キューに入れられた作業が完了しますが、私のサーバーは、まだログにこのエラーで倒れる:
INFO 2011-02-06 17:50:32,882 dev_appserver.py:3317] "POST /processWork HTTP/1.1" 200 -
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 311, in process_request
self.shutdown_request(request)
File "C:\Python27\lib\SocketServer.py", line 459, in shutdown_request
request.shutdown(socket.SHUT_WR)
AttributeError: 'FakeConnection' object has no attribute 'shutdown'
ERROR 2011-02-06 17:50:32,884 dev_appserver_main.py:494] Error encountered:
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 488, in main
http_server.serve_forever()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3947, in serve_forever
self.handle_request()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3913, in handle_request
self._handle_request_noblock()
File "C:\Python27\lib\SocketServer.py", line 287, in _handle_request_noblock
self.shutdown_request(request)
File "C:\Python27\lib\SocketServer.py", line 459, in shutdown_request
request.shutdown(socket.SHUT_WR)
AttributeError: 'FakeConnection' object has no attribute 'shutdown'
Now terminating.
----------------------------------------
Exception happened during processing of request from ('0.1.0.2', 80)
----------------------------------------
2011-02-06 09:50:32 (Process exited with code 1)
私はtaskqueue.addの呼び出しを削除した場合、それは当然のことながら、キューに入れられた作業をせずに(正常に動作します)。何がうまくいかないのですか?
をインポートしないということです。 http://code.google.com/appengine/docs/python/gettingstarted/devenvironment.htmlこれが現在の問題に影響するかどうかはわかりません。 – kevpie