I tried this code to save my JSON data to my model that is Mvouchar. But getting this error. I easily get data through cmd but I tried to save this in my model then I get the error, why this happens, I think am doing some minor mistake but can't catch please help if u get my problem
#views.py
@csrf_exempt
def jsdata(request):
    table_data = json.loads(request.POST.get('MyData'))
    print(table_data)
    for data in table_data:
     b_no = request.POST['billno']
     b_details = request.POST['billdetails']
     at = request.POST['amount2']
     record = Mvouchar(bill_no = data.b_no, bill_details = data.b_details,am=data.at)
    record.save()
    return render(request, 'cheque/mvouchar.html', {'msg': 'Data Saved.'})
    
#models.py
class Mvouchar(models.Model):
 related = models.ForeignKey(Signs, on_delete=models.CASCADE, null=True, blank=True)
 bill_no = models.CharField(max_length=80, null=True, blank=True)
 bill_details = models.CharField(max_length=1000, null=True, blank=True)
 am = models.CharField(max_length=30, null=True, blank=True)
 vouchar_no = models.CharField(max_length=1000, null=True, blank=True)
  
#urls.py
url(r'jsondata/$', views.jsdata, name='jsondata'),
#script
<script>
$("#btnjson").click(function () {
   var array1 = [];
     $("tbody tr").each(function () {
                        var firstTableData = {};
                        firstTableData.BillNo = $(this).find('td').eq(0).text();
                        firstTableData.BillDetails = $(this).find('td').eq(1).text();
                        firstTableData.Amount = $(this).find('td').eq(2).text();
                        array1.push(firstTableData);
                    //}
                }); 
    alert(JSON.stringify(array1));
     $.ajax({
    type: "POST",
    url: "/jsondata/",
    dataType: 'json',
    data: {MyData: JSON.stringify(array1)},
    success: function(msg){
                alert(msg);
            }
        });
        return false;
    } );
   });
</script> 
     
     
     
    