मैं मॉड्यूल का उपयोग करके पायथन में model.filefieldएक सीएसवी फ़ाइल को पार्स करने के लिए Django में प्रवेश करने की कोशिश कर रहा हूं csv। यह विंडोज पर काम कर रहा है, लेकिन मैक पर इसने मुझे यह दिया:
Exception Type: Error
Exception Value: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
यह कोड है:
myfile = customerbulk.objects.all()[0].fileup
mydata = csv.reader(myfile)
for email,mobile,name,civilid in mydata:
print email,mobile,name,civilid
customerbulk.objects.all()[0].fileupचीज है क्या यह एक मॉडल पर एक फ़ाइल नाम है?