diff --git a/rog/models.py b/rog/models.py index 06c40ba..6cce09e 100644 --- a/rog/models.py +++ b/rog/models.py @@ -387,7 +387,8 @@ def publish_date(sender, instance, created, **kwargs): mdl = apps.get_model(app_label="rog", model_name=LAYER_CHOICES[instance.layerof -1][1]) print(mdl) print(f"#### instance.layerof - {instance.layerof}") - with open(csv_f, 'r') as txt_file: + with open(csv_f, mode="r", encoding="utf-8") as txt_file: + #heading = next(txt_file) reader = csv.reader(txt_file, delimiter=",") for fields in reader: print("@@@@@@@@@@@@")