How to convert large csv to json in action django-admin with celery?

I am trying to convert large csv in django-admin to be converted to json, through a django action that uses celery in the background. So that the user does not have to wait to finish for use the system. I have some errors, could your help?

class DataExtraction(models.Model):
   dataset = JSONField(blank=True, null=True)

   def __str__(self):
      return str( Extraction(models.Model):

 class Extraction(models.Model):
    name = models.CharField(max_length=100, blank=False, default=None)
    lawsuits = models.FileField(blank=True, null=False)

    def __str__(self):

from django.contrib import admin
from .models import Extraction, DataExtraction
from web.core.tasks import convert_data
import csv

def spider(modeladmin, request, queryset):
   for extraction in queryset:
      csv_file_path = extraction.lawsuits.path

spider.short_description = "Apply Spider"

class ExtractionAdmin(admin.ModelAdmin):
   list_display = ['name']
   actions = [spider], ExtractionAdmin)

from celery import shared_task
from web.celery import app
from web.core.models import Tasks, DataExtraction, Extraction
import csv

def read_data_csv(path):
   with open(path) as csv_file:
      reader = csv.DictReader(csv_file, delimiter=',')
      csv_data = [line for line in reader]
   return csv_data

def convert_data(path):
   dataset = read_data_csv(path)
   aux = []
   for data in dataset:
      obj = DataExtraction(dataset=data)




celery_1       |   File "/code/web/core/", line 17, in name
celery_1       |     def convert_data(path):
celery_1       | AttributeError: 'FileDescriptor' object has no attribute 'path'


web_1          |   File "/code/web/core/", line 17, in spider
web_1          |     convert_data(csv_file_path).delay()
web_1          | AttributeError: 'NoneType' object has no attribute 'delay'