Solved by ptrblck in post #2 
              
              
                Could you try to write a transform class and replace the lambda method with it? 
As far as I know there are some limitation in Python regarding pickling lambdas, which is apparently the case here.