title: Can't pickle : attribute lookup builtin.function failed
body: <p>I'm getting the error below, the error only happens when I add <code>delay</code> to  <code>process_upload</code> function, otherwise it works without a problem.</p>
  
  <p><strong>Could someone explain what this error is, why its happening and any recommendations to resolve?</strong></p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>PicklingError at /contacts/upload/configurator/47/
    Can't pickle &lt;type 'function'&gt;: attribute lookup __builtin__.function failed
  </code></pre>
  
  <p><strong>This is the view</strong></p>
  
  <pre><code> if request.method == 'POST':
          form = ConfiguratorForm(data=request.POST)
          # Send import to task.
          process_upload.delay(upload_id=upload.id, form=form)
  </code></pre>
  
  <p><strong>This is the task</strong></p>
  
  <pre><code>@task
  def process_upload(upload_id, form):
      upload = Upload.objects.get(id=upload_id)
      upload.process(form=form)
  </code></pre>
  
  <p><strong>Upload.process is within my model:</strong></p>
  
  <pre><code> def process(self, form):
          self.date_start_processing = timezone.now()
              import_this(data=self.filepath, extra_fields=[
                  {'value': self.group_id, 'position': 5},
                  {'value': self.uploaded_by.id, 'position': 6}], form=form)
  </code></pre>
  
  <p><strong>Full trace:</strong></p>
  
  <pre><code>Traceback:
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    115.                         response = callback(request, *callback_args, **callback_kwargs)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
    25.                 return view_func(request, *args, **kwargs)
  File "/Users/user/Documents/workspace/sms/contacts/views.py" in upload_configurator
    118.         process_upload.delay(upload_id=upload.id, form=form)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/celery/app/task.py" in delay
    357.         return self.apply_async(args, kwargs)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/celery/app/task.py" in apply_async
    472.                                      **options)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/celery/app/amqp.py" in publish_task
    249.             **kwargs
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/kombu/messaging.py" in publish
    157.             compression, headers)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/kombu/messaging.py" in _prepare
    233.              body) = encode(body, serializer=serializer)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/kombu/serialization.py" in encode
    161.         payload = encoder(data)
  File "/Users/user/Documents/workspace/sms/django-env/lib/python2.7/site-packages/kombu/serialization.py" in dumps
    340.         return dumper(obj, protocol=pickle_protocol)
  
  Exception Type: PicklingError at /contacts/upload/configurator/47/
  Exception Value: Can't pickle &lt;type 'function'&gt;: attribute lookup __builtin__.function failed
  </code></pre>
  
  <p>forms.py</p>
  
  <pre><code>COL_CHOICES = [
      ('N/A', 'No Import'),
      ('first_name', 'First Name'),
      ('last_name', 'Last Name'),
      ('company', 'Company'),
      ('mobile', 'Mobile Number'),
      ('email', 'Email Address'),
      ]
  
  
  class ConfiguratorForm(forms.Form):
      col1 = forms.TypedChoiceField(choices=COL_CHOICES, initial='first_name')
      col2 = forms.TypedChoiceField(choices=COL_CHOICES, initial='first_name')
      col3 = forms.TypedChoiceField(choices=COL_CHOICES, initial='first_name')
      col4 = forms.TypedChoiceField(choices=COL_CHOICES, initial='first_name')
  </code></pre>