Note that there are some explanatory texts on larger screens.

plurals
  1. POPermanentTaskFailure: 'module' object has no attribute 'Migrate'
    primarykey
    data
    text
    <p>I'm using Nick Johnson's Bulk Update library on google appengine (http://blog.notdot.net/2010/03/Announcing-a-robust-datastore-bulk-update-utility-for-App-Engine). It works wonderfully for other tasks, but for some reason with the following code:</p> <pre><code> from google.appengine.ext import db from myapp.main.models import Story, Comment import bulkupdate class Migrate(bulkupdate.BulkUpdater): DELETE_COMPLETED_JOBS_DELAY = 0 DELETE_FAILED_JOBS = False PUT_BATCH_SIZE = 1 DELETE_BATCH_SIZE = 1 MAX_EXECUTION_TIME = 10 def get_query(self): return Story.all().filter("hidden", False).filter("visible", True) def handle_entity(self, entity): comments = entity.comment_set for comment in comments: s = Story() s.parent_story = comment.story s.user = comment.user s.text = comment.text s.submitted = comment.submitted self.put(s) job = Migrate() job.start() </code></pre> <p>I get the following error in my logs:</p> <pre><code>Permanent failure attempting to execute task Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/deferred/deferred.py", line 258, in post run(self.request.body) File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/deferred/deferred.py", line 122, in run raise PermanentTaskFailure(e) PermanentTaskFailure: 'module' object has no attribute 'Migrate' </code></pre> <p>It seems quite bizarre to me. Clearly that class is right above the job, they're in the same file and clearly the job.start is being called. Why can't it see my Migrate class?</p> <p>EDIT: I added this update job in a newer version of the code, which isn't the default. I invoke the job with the correct URL (http://version.myapp.appspot.com/migrate). Is it possible this is related to the fact that it isn't the 'default' version served by App Engine?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload