leontx
leontx

Reputation: 1195

Mapreduce no longer works after 2.7 conversion

After converting our app to Python 2.7, configuring for multithreading, and referencing mapreduce in app.yaml like this...

- url: /mapreduce(/.*)?
  script: mapreduce.main.app
  #script: google.appengine.ext.mapreduce.main.app
  login: admin

and invoking mapreduce like this...

  control.start_map(
      "FNFR",
      "fnfr.fnfrHandler",
      "mapreduce.input_readers.BlobstoreLineInputReader",
      {"blob_keys": blobKey},
      shard_count=32,
      mapreduce_parameters={'done_callback': '/fnfrdone','blobKey': blobKey, 'userID':thisUserID})

we get the following stack trace...

Traceback (most recent call last):
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 189, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 241, in _LoadHandler
    raise ImportError('%s has no attribute %s' % (handler, name))
ImportError: <module 'mapreduce.main' from '/base/data/home/apps/s~xxxxxxonline/2.361692533819432574/mapreduce/main.pyc'> has no attribute app 

I found one SO reference ( How to migrate my app.yaml to 2.7? ) but as you can see from my yaml, I think I've tried all combinations to try to get it to resolve. Thanks.

Upvotes: 1

Views: 411

Answers (1)

dragonx
dragonx

Reputation: 15143

This worked for me, but I'm still on a pretty old version of the SDK, I don't know if they fixed this:

- url: /mapreduce(/.*)?
  script: mapreduce.main.APP
  login: admin

Upvotes: 5

Related Questions