I am trying to import a CSV file, using a form to upload the file from the client system. After I have the file, I\'ll take parts of it and populate a model in my app. However,
Fuse your two methods, this never fails in Python 3.5.2 and Django 1.9
delimitador = list_delimitadores[int(request.POST['delimitador'])][1]
try:
text = TextIOWrapper(request.FILES['csv_x'].file, encoding='utf-8 ', errors='replace')
reader = csv.reader(text, delimiter=delimitador)
except:
text = StringIO(request.FILES['csv_x'].file.read().decode())
reader = csv.reader(text, delimiter=delimitador)