UnexpectedPipelineError: Yielded a disallowed value: handlers.importpipeline.AddOne(*(15,), **{})

152 views
Skip to first unread message

Caio Iglesias

unread,
Jun 16, 2014, 4:33:29 PM6/16/14
to app-engine-...@googlegroups.com
I'm used to using the Pipeline API inside the mapreduce library, but now that I'm using just the pipeline library solo I can't get past starting the pipeline. I always get the same error: "Yielded a disallowed value". I tried using the same library from mapreduce to see if the one I downloaded was bugged using and got the same thing... Removed my code and went with the sample code from the "getting started guide":

class AddOne(pipeline.Pipeline):
    def run(self, number):
        return number + 1

class AddTwo(pipeline.Pipeline):
    def run(self, number):
        result = yield AddOne(number)
        yield AddOne(result)

Started this pipeline and got stuck at the same error:

UnexpectedPipelineError: Yielded a disallowed value: handlers.importpipeline.AddOne(*(15,), **{})

Has anyone been through this?

Brett Slatkin

unread,
Jun 16, 2014, 4:37:56 PM6/16/14
to app-engine-...@googlegroups.com
It sounds like you have two versions of the pipeline library in your system path, one you're using to define those pipelines, and another that's actually running the background tasks. It does an "isinstance" check to make sure yielded values are of the right class. That check is failing because they are actually separate modules.

Caio Iglesias

unread,
Jun 16, 2014, 4:53:36 PM6/16/14
to app-engine-...@googlegroups.com
Humm, got it. I'll borrow the whole thing from mapreduce library then.

from mapreduce import base_handler

class AddOne(base_handler.PipelineBase):
    def run(self, number):
        return number + 1

class AddTwo(base_handler.PipelineBase):
    def run(self, number):
        result = yield AddOne(number)
        yield AddOne(result)

It works now!

Thank you very much Brett, I'm a big fan of your work/sessions!


On Mon, Jun 16, 2014 at 5:37 PM, 'Brett Slatkin' via Google App Engine Pipeline API <app-engine-...@googlegroups.com> wrote:
It sounds like you have two versions of the pipeline library in your system path, one you're using to define those pipelines, and another that's actually running the background tasks. It does an "isinstance" check to make sure yielded values are of the right class. That check is failing because they are actually separate modules.

--
You received this message because you are subscribed to the Google Groups "Google App Engine Pipeline API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-engine-pipeli...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brett Slatkin

unread,
Jun 16, 2014, 4:55:54 PM6/16/14
to app-engine-...@googlegroups.com
Great! Happy to hear it. And thanks.
Reply all
Reply to author
Forward
0 new messages