Closed GoogleCodeExporter closed 8 years ago
Original comment by bquin...@google.com
on 22 Jan 2013 at 11:25
Thanks for accepting.
I am linking related googleappengine Issue 5701: modify python paths with
app.yaml
http://code.google.com/p/googleappengine/issues/detail?id=5701
A fix for Issue 5701 would presumably also address the issue here.
Original comment by brianmh...@gmail.com
on 22 Jan 2013 at 2:39
This looks like it's working as intended. If a deferred request is the first
request to hit an instance, your path setup won't have run. devappserver2 is
correctly emulating production behavior.
You may be able to work around this by doing your path setup in your
appengine_config.py.
Original comment by sa...@google.com
on 22 Jan 2013 at 11:19
Good to know, thanks.
It would be wonderful if the tip on putting python path into
`appengine_config.py` were documented (I couldn't seem to find it). It's very
handy.
Original comment by brianmh...@gmail.com
on 23 Jan 2013 at 1:28
Traceback (most recent call last): File "/Users/bmh/dev/vendors/appengine-devappserver2-experiment/google/appengine/ext/deferred/deferred.py", line 309, in post self.run_from_request() File "/Users/bmh/dev/vendors/appengine-devappserver2-experiment/google/appengine/ext/deferred/deferred.py", line 304, in run_from_request run(self.request.body) File "/Users/bmh/dev/vendors/appengine-devappserver2-experiment/google/appengine/ext/deferred/deferred.py", line 144, in run raise PermanentTaskFailure(e) PermanentTaskFailure: No module named flask
In the file containing the deferred task I will have at the head, among other things, something like:
The deferred task is called in the usual way with something like:
Sometimes the deferred task will run, indicating some sort of race condition.
The workaround I have found is to hard-code my add-on paths into the file containing the deferred call, like this:
I hope the above is helpful.